| 12345678910111213141516171819202122232425262728293031 |
- package main
- import "git.wanbits.io/joe/nnet"
- // protocol && callback, Using TCP
- type ALProtocol struct{}
- func (self *ALProtocol) ReadPacket(conn nnet.IConn) (nnet.IPacket, error) {
- return nil, nil
- }
- func (self *ALProtocol) Serialize(packet nnet.IPacket) ([]byte, error) {
- return nil, nil
- }
- func (self *ALProtocol) OnClosed(ses nnet.ISession, reason int32) {
- }
- func (self *ALProtocol) OnConnected(ses nnet.ISession) (bool, int32) {
- return true, 0
- }
- func (self *ALProtocol) OnMessage(ses nnet.ISession, pkt nnet.IPacket) bool {
- return true
- }
- // server-side dont handle heartbeat.
- func (self *ALProtocol) OnHeartbeat(ses nnet.ISession) bool {
- return true
- }
|