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