nbioservice

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

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

type NbioService_WebSocket struct {
	*zservice.ZService
	// contains filtered or unexported fields
}

func NewNbioService_WebSocket

func NewNbioService_WebSocket(opt NbioServiceOption_WebScoket) *NbioService_WebSocket

websocket 连接

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL