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() }