server/server_handler.go

21 lines
324 B
Go
Raw Normal View History

2017-10-26 11:14:00 +00:00
package server
import (
"io"
"net"
)
type ServerHandler interface {
Listen() (net.Listener, error)
Handle(remoteAddr string, rwc io.ReadWriteCloser, stopChan chan struct{})
2017-10-27 05:27:36 +00:00
OnStopped()
IsClientDisconnect(err error) bool
2017-10-26 11:14:00 +00:00
GetAddr() string
Validate()
accept(l net.Listener) (io.ReadWriteCloser, string, error)
}