Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NbioServiceOption_WebScoket ¶
type NbioServiceOption_WebScoket struct { ListenPort string // 监听的端口 MaxLoad uint // 最大连接数 默认:10K OnRequest func(w http.ResponseWriter, r *http.Request) bool // 响应请求, 在 Upgrader 之前调用, 返回 false 表示拒绝进行 Upgrader 操作 OnOpen func(c *websocket.Conn) // 响应链接 OnMessage func(c *websocket.Conn, messageType websocket.MessageType, data []byte) // 响应消息 OnClose func(c *websocket.Conn, err error) // 响应关闭 }
type NbioService_WebSocket ¶
func NewNbioService_WebSocket ¶
func NewNbioService_WebSocket(opt NbioServiceOption_WebScoket) *NbioService_WebSocket
websocket 连接
Click to show internal directories.
Click to hide internal directories.