2018-04-03 08:55:48 +00:00
|
|
|
package server
|
|
|
|
|
|
|
|
type Servlet interface {
|
2018-04-04 04:01:26 +00:00
|
|
|
ServletCtx(serverCtx ServerCtx) ServletCtx
|
|
|
|
|
|
|
|
Init(serverCtx ServerCtx) error
|
|
|
|
Destroy(serverCtx ServerCtx)
|
|
|
|
|
2018-04-04 16:51:34 +00:00
|
|
|
OnConnect(servletCtx ServletCtx, conn Conn)
|
2018-04-04 04:01:26 +00:00
|
|
|
Handle(servletCtx ServletCtx, stopChan <-chan struct{}, doneChan chan<- struct{}, readChan <-chan []byte, writeChan chan<- []byte)
|
|
|
|
OnDisconnect(servletCtx ServletCtx)
|
2018-04-03 08:55:48 +00:00
|
|
|
}
|