22 lines
417 B
Go
22 lines
417 B
Go
package server
|
|
|
|
import (
|
|
"io"
|
|
"time"
|
|
)
|
|
|
|
type ClientHandler interface {
|
|
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()
|
|
}
|