fix
This commit is contained in:
parent
43d5fe6692
commit
d69f0e4d72
|
@ -74,15 +74,6 @@ var (
|
|||
websocketOutChanLen = 2000
|
||||
)
|
||||
|
||||
// 用户标识的连接增删操作队列传输的值的结构
|
||||
type userConnPoolCtlChanItem struct {
|
||||
userId int64 //必须(两个用户id任意一个不为0)
|
||||
guestId int64 //必须(两个用户id任意一个不为0)
|
||||
uniqueId string //主连接池唯一标识(添加/删除时候必须)
|
||||
message []byte //消息(发送消息传的,格式是经过标准输出序列化后的数据)
|
||||
option int64 //操作 2发消息 1增加 0删除
|
||||
}
|
||||
|
||||
// 每个连接的连接基本属性
|
||||
type wsConnectItem struct {
|
||||
conn *websocket.Conn //websocket的连接(基本属性)
|
||||
|
|
|
@ -13,6 +13,15 @@ var (
|
|||
userConnPoolCtlChan = make(chan userConnPoolCtlChanItem, 500)
|
||||
)
|
||||
|
||||
// 用户标识的连接增删操作队列传输的值的结构
|
||||
type userConnPoolCtlChanItem struct {
|
||||
userId int64 //必须(两个用户id任意一个不为0)
|
||||
guestId int64 //必须(两个用户id任意一个不为0)
|
||||
uniqueId string //主连接池唯一标识(添加/删除时候必须)
|
||||
message []byte //消息(发送消息传的,格式是经过标准输出序列化后的数据)
|
||||
option int64 //操作 2发消息 1增加 0删除
|
||||
}
|
||||
|
||||
// 添加用户索引池ws连接
|
||||
func createUserConnPoolElement(userId, guestId int64, uniqueId string) {
|
||||
if userId == 0 && guestId == 0 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user