Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SocketStart ¶
func SocketStart()
Types ¶
type Client ¶
type ClientManager ¶
type ClientManager struct { Client map[*Client]bool //全部的连接 ClientsLock sync.RWMutex //读写锁 Users map[string]*Client //登陆的用户 //appID+uuid UsersLock sync.RWMutex //读写锁 Connect chan *Client //连接处理 Disconnect chan *Client //断开连接处理 Login chan *Client //用户登录处理 Broadcast chan *Client //广播 向全部成员发送数据 }
func NewClientManager ¶
func NewClientManager() *ClientManager
Click to show internal directories.
Click to hide internal directories.