websocket_fasthttp/server_handler.go
crusader 944de8ecf5 ing
2017-11-10 17:33:40 +09:00

33 lines
670 B
Go

package websocket_fasthttp
import (
"net"
"time"
"github.com/valyala/fasthttp"
)
type ServerHandler interface {
Listen() (net.Listener, error)
CheckOrigin(ctx *fasthttp.RequestCtx) bool
OnError(ctx *fasthttp.RequestCtx, status int, reason error)
OnStart() error
OnStop()
RegisterSocketHandler(path string, handler SocketHandler)
GetSocketHandler(path string) (SocketHandler, error)
GetName() string
GetConcurrency() int
GetMaxStopWaitTime() time.Duration
GetHandshakeTimeout() time.Duration
GetReadBufferSize() int
GetWriteBufferSize() int
GetReadTimeout() time.Duration
GetWriteTimeout() time.Duration
IsEnableCompression() bool
Validate()
}