server/server_handler.go
crusader 7e0de361a8 ing
2017-11-01 14:22:52 +09:00

20 lines
291 B
Go

package server
import (
"net"
)
type ServerHandler interface {
Listen() (net.Listener, error)
OnAccept(conn net.Conn) (net.Conn, error)
OnStart()
OnStop()
Handle(conn net.Conn, stopChan <-chan struct{}, doneChan chan<- struct{})
IsClientDisconnect(err error) bool
Validate()
}