websocket_fasthttp/client/socket_handler.go
crusader eb528c5a43 ing
2017-11-30 12:15:05 +09:00

28 lines
542 B
Go

package client
import (
"net/http"
"time"
)
type SocketHandler interface {
OnConnect(socketContext SocketContext, res *http.Response)
OnDisconnect(soc Socket)
GetMaxMessageSize() int64
GetWriteTimeout() time.Duration
GetReadTimeout() time.Duration
GetPongTimeout() time.Duration
GetPingTimeout() time.Duration
GetPingPeriod() time.Duration
// Validate is check handler value
// If you override ths method, must call
//
// func (sh *SocketHandlers) Validate() {
// sh.SocketHandlers.Validate()
// ...
// }
Validate()
}