Merge branch 'develop' of https://gitee.com/fusenpack/fusenapi into develop
This commit is contained in:
commit
01142adfcb
|
@ -366,7 +366,7 @@ func (w *wsConnectItem) sendToInChan(data []byte) {
|
|||
case w.inChan <- data:
|
||||
return
|
||||
case <-time.After(time.Millisecond * 200): //200豪秒超时丢弃,说明超过消费速度了
|
||||
w.sendToOutChan(w.respondDataFormat(constants.WEBSOCKET_INCOME_CACHE_QUEUE_OVERFLOW, "send message is too frequent,Please reduce the sending speed ,otherwise, the message you sent may be lost"))
|
||||
w.sendToOutChan(w.respondDataFormat(constants.WEBSOCKET_INCOME_CACHE_QUEUE_OVERFLOW, "send message is too frequent,the message is ignore by system:"+string(data)))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@ -399,6 +399,6 @@ func (w *wsConnectItem) dealwithReciveData(data []byte) {
|
|||
case constants.WEBSOCKET_REQUEST_REUSE_LAST_CONNECT:
|
||||
w.reuseLastConnect(d)
|
||||
default:
|
||||
logx.Error("未知消息类型:", parseInfo.T)
|
||||
logx.Error("未知消息类型:uid:", w.userId, "gid:", w.guestId, "data:", string(data))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,14 +68,14 @@ func (w *wsConnectItem) consumeRenderImageData() {
|
|||
case <-w.closeChan: //已关闭
|
||||
return
|
||||
case data := <-w.extendRenderProperty.renderChan:
|
||||
w.consumeRenderCache(data)
|
||||
w.renderImage(data)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 消费渲染缓冲数据
|
||||
func (w *wsConnectItem) consumeRenderCache(data []byte) {
|
||||
// 执行渲染任务
|
||||
func (w *wsConnectItem) renderImage(data []byte) {
|
||||
logx.Info("消费渲染数据:", string(data))
|
||||
var renderImageData websocket_data.RenderImageReqMsg
|
||||
if err := json.Unmarshal(data, &renderImageData); err != nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user