Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOptions = &Options{ OpCode: ws.OpText, Dialer: ws.DefaultDialer, Upgrader: ws.DefaultHTTPUpgrader, ServeMux: http.DefaultServeMux, Backlog: 128, }
DefaultOptions default websocket options
Functions ¶
func WithOptions ¶
WithOptions to wrap the websocket options
Types ¶
type Options ¶
type Options struct {
Cert string `json:"cert"`
Key string `json:"key"`
OpCode ws.OpCode `json:"opCode"`
Routers []string `json:"routers"`
CheckUTF8 bool `json:"checkUTF8"`
MaxFrameSize int64 `json:"maxFrameSize"`
ReadBufferSize int `json:"readBufferSize"`
WriteBufferSize int `json:"writeBufferSize"`
Backlog int `json:"backlog"`
Dialer ws.Dialer `json:"-"`
Upgrader ws.HTTPUpgrader `json:"-"`
ServeMux *http.ServeMux `json:"-"`
}
Options to define the websocket
Click to show internal directories.
Click to hide internal directories.