server/server_handler.go
crusader d13384841b ing
2017-10-27 14:27:36 +09:00

21 lines
324 B
Go

package server
import (
"io"
"net"
)
type ServerHandler interface {
Listen() (net.Listener, error)
Handle(remoteAddr string, rwc io.ReadWriteCloser, stopChan chan struct{})
OnStopped()
IsClientDisconnect(err error) bool
GetAddr() string
Validate()
accept(l net.Listener) (io.ReadWriteCloser, string, error)
}