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