18 lines
254 B
Go
18 lines
254 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{})
|
|
|
|
Validate()
|
|
}
|