package server import ( "io" "time" ) type ClientHandler interface { OnStart() OnStop() Dial() (conn io.ReadWriteCloser, err error) OnHandshake(remoteAddr string, rwc io.ReadWriteCloser) error Handle(rwc io.ReadWriteCloser, stopChan chan struct{}) GetAddr() string GetPendingRequests() int GetRequestTimeout() time.Duration GetSendBufferSize() int GetRecvBufferSize() int GetKeepAlivePeriod() time.Duration Validate() }