websocket_fasthttp/socket_handler.go
crusader b5a6a7280c ing
2017-11-08 19:15:09 +09:00

22 lines
486 B
Go

package websocket_fasthttp
import (
"time"
"github.com/valyala/fasthttp"
)
type SocketHandler interface {
Handshake(ctx *fasthttp.RequestCtx) (connectable bool, extensionsHeader *fasthttp.ResponseHeader)
Handle(soc *Socket, stopChan <-chan struct{}, doneChan chan<- struct{})
GetMaxMessageSize() int64
GetWriteTimeout() time.Duration
GetReadTimeout() time.Duration
GetPongTimeout() time.Duration
GetPingTimeout() time.Duration
GetPingPeriod() time.Duration
Validate()
}