server-go/servlet.go
crusader cb6cff91ac ing
2018-04-04 14:47:10 +09:00

13 lines
367 B
Go

package server
type Servlet interface {
ServletCtx(serverCtx ServerCtx) ServletCtx
Init(serverCtx ServerCtx) error
Destroy(serverCtx ServerCtx)
OnConnect(servletCtx ServletCtx, conn *Conn)
Handle(servletCtx ServletCtx, stopChan <-chan struct{}, doneChan chan<- struct{}, readChan <-chan []byte, writeChan chan<- []byte)
OnDisconnect(servletCtx ServletCtx)
}