Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUpgradeConnection ¶
GetUpgradeConnection get web socket connection
Types ¶
type Client ¶
type Client struct { // unique id ID string // connection Conn *websocket.Conn // 处理方法 Handler IHandler // 连接时的回调 OpenHandler func() // 关闭时的回调 CloseHandler func() // 扩展字段 Extends map[string]interface{} // contains filtered or unexported fields }
Client is a websocket client
type IClient ¶
type IClient interface { OnOpen() OnClose() Listen() SendMessage(message []byte) }
IClient
Click to show internal directories.
Click to hide internal directories.