websocket_fasthttp/socket_handler.go

22 lines
486 B
Go
Raw Normal View History

2017-11-07 19:03:40 +09:00
package websocket_fasthttp
import (
2017-11-08 19:15:09 +09:00
"time"
2017-11-07 19:03:40 +09:00
"github.com/valyala/fasthttp"
)
type SocketHandler interface {
2017-11-08 14:30:56 +09:00
Handshake(ctx *fasthttp.RequestCtx) (connectable bool, extensionsHeader *fasthttp.ResponseHeader)
2017-11-08 19:15:09 +09:00
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()
2017-11-07 19:03:40 +09:00
}