server/server_handler.go
crusader ee5c8cf463 ing
2017-10-27 16:14:20 +09:00

22 lines
386 B
Go

package server
import (
"io"
"net"
)
type ServerHandler interface {
Listen() (net.Listener, error)
OnHandshake(remoteAddr string, rwc io.ReadWriteCloser) 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)
}