server-go/servlet.go
crusader f85b949e66 ing
2018-04-04 13:01:26 +09:00

17 lines
433 B
Go

package server
import (
"git.loafle.net/commons/server-go/internal"
)
type Servlet interface {
ServletCtx(serverCtx ServerCtx) ServletCtx
Init(serverCtx ServerCtx) error
Destroy(serverCtx ServerCtx)
OnConnect(servletCtx ServletCtx, conn *internal.Conn)
Handle(servletCtx ServletCtx, stopChan <-chan struct{}, doneChan chan<- struct{}, readChan <-chan []byte, writeChan chan<- []byte)
OnDisconnect(servletCtx ServletCtx)
}