Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
SendMessage 将消息投递到out channel ReadMessage 从 in channel 读取消息 起两个协程
读协程,循环读取websocket,将消息投递到in channel 写协程,循环读取 out channel,将消息写回 websocket
func InitConnection ¶
func InitConnection(wsConn *websocket.Conn) (conn *Connection, err error)
init
Click to show internal directories.
Click to hide internal directories.