22 lines
486 B
Go
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()
|
|
}
|