server/server_handler.go
crusader ec72c171fb ing
2017-11-29 09:51:41 +09:00

21 lines
385 B
Go

package server
import (
"net"
)
type ServerHandler interface {
ServerContext() ServerContext
Init(serverCTX ServerContext) error
Listen(serverCTX ServerContext) (net.Listener, error)
OnStart(serverCTX ServerContext)
OnError(serverCTX ServerContext, conn net.Conn, status int, reason error)
OnStop(serverCTX ServerContext)
IsClientDisconnect(err error) bool
Validate()
}