server/client_handler.go
crusader ab60b6ccda ing
2017-10-27 17:53:26 +09:00

25 lines
439 B
Go

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