server-go/servlet.go
crusader 899fc53ded ing
2018-04-05 01:51:34 +09:00

13 lines
366 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)
}