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-26 12:08:50 +00:00
|
|
|
Stopped()
|
2017-10-26 11:14:00 +00:00
|
|
|
|
|
|
|
GetAddr() string
|
|
|
|
|
|
|
|
Validate()
|
|
|
|
|
|
|
|
accept(l net.Listener) (io.ReadWriteCloser, string, error)
|
|
|
|
}
|