2017-10-26 11:14:00 +00:00
|
|
|
package server
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net"
|
|
|
|
)
|
|
|
|
|
|
|
|
type ServerHandler interface {
|
2017-11-01 05:22:52 +00:00
|
|
|
Listen() (net.Listener, error)
|
|
|
|
OnAccept(conn net.Conn) (net.Conn, error)
|
|
|
|
|
2017-10-27 08:53:26 +00:00
|
|
|
OnStart()
|
|
|
|
OnStop()
|
|
|
|
|
2017-11-01 05:22:52 +00:00
|
|
|
Handle(conn net.Conn, stopChan <-chan struct{}, doneChan chan<- struct{})
|
2017-10-27 05:27:36 +00:00
|
|
|
|
2017-10-26 11:14:00 +00:00
|
|
|
Validate()
|
|
|
|
}
|