This commit is contained in:
laodaming 2023-08-30 17:07:14 +08:00
parent a4f8649de0
commit 2ce9776255

View File

@ -313,7 +313,8 @@ func (w *wsConnectItem) consumeInChanData() {
case <-w.closeChan:
return
case data := <-w.inChan:
w.dealwithReciveData(data)
//对不同消息类型分发处理
w.allocationProcessing(data)
}
}
}
@ -382,7 +383,7 @@ func (w *wsConnectItem) respondDataFormat(msgType constants.Websocket, data inte
}
// 处理入口缓冲队列中不同类型的数据(分发处理)
func (w *wsConnectItem) dealwithReciveData(data []byte) {
func (w *wsConnectItem) allocationProcessing(data []byte) {
var parseInfo websocket_data.DataTransferData
if err := json.Unmarshal(data, &parseInfo); err != nil {
w.incomeDataFormatErrResponse("invalid format of income message:" + string(data))