fix
This commit is contained in:
parent
24db7eb68a
commit
ab5004885a
|
@ -62,23 +62,23 @@ var (
|
|||
}
|
||||
//websocket连接存储
|
||||
mapConnPool = sync.Map{}
|
||||
//公共互斥锁
|
||||
//公共互斥锁(复用连接标识用)
|
||||
publicMutex sync.Mutex
|
||||
)
|
||||
|
||||
// 每个连接的连接基本属性
|
||||
type wsConnectItem struct {
|
||||
conn *websocket.Conn //websocket的连接
|
||||
logic *DataTransferLogic //logic
|
||||
closeChan chan struct{} //ws连接关闭chan
|
||||
isClose bool //是否已经关闭
|
||||
uniqueId string //ws连接唯一标识
|
||||
inChan chan []byte //接受消息缓冲通道
|
||||
outChan chan []byte //发送回客户端的消息
|
||||
mutex sync.Mutex //互斥锁
|
||||
userId int64 //用户id
|
||||
guestId int64 //游客id
|
||||
renderProperty renderProperty //扩展云渲染属性
|
||||
conn *websocket.Conn //websocket的连接(基本属性)
|
||||
logic *DataTransferLogic //logic(基本属性,用于获取上下文,配置或者操作数据库)
|
||||
closeChan chan struct{} //ws连接关闭chan(基本属性)
|
||||
isClose bool //是否已经关闭(基本属性)
|
||||
uniqueId string //ws连接唯一标识(基本属性)
|
||||
inChan chan []byte //接受消息缓冲通道(基本属性)
|
||||
outChan chan []byte //发送回客户端的消息(基本属性)
|
||||
mutex sync.Mutex //互斥锁(关闭连接方法中用)
|
||||
userId int64 //用户id(基本属性)
|
||||
guestId int64 //游客id(基本属性)
|
||||
renderProperty renderProperty //扩展云渲染属性(扩展属性)
|
||||
}
|
||||
|
||||
// 请求建立连接,升级websocket协议
|
||||
|
|
Loading…
Reference in New Issue
Block a user