server/server_handler.go

22 lines
386 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)
2017-10-27 07:14:20 +00:00
OnHandshake(remoteAddr string, rwc io.ReadWriteCloser) error
2017-10-26 11:14:00 +00:00
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)
}