server/client/socket_handler.go

18 lines
331 B
Go
Raw Normal View History

2017-11-30 09:13:58 +00:00
package client
import "net"
type SocketHandler interface {
OnConnect(socketContext SocketContext, conn net.Conn)
OnDisconnect(soc Socket)
// Validate is check handler value
// If you override ths method, must call
//
// func (sh *SocketHandlers) Validate() {
// sh.SocketHandlers.Validate()
// ...
// }
Validate()
}