fix
This commit is contained in:
parent
c942855683
commit
41caa6db64
|
@ -133,14 +133,14 @@ func (l *DataTransferLogic) setConnPool(conn *websocket.Conn, userInfo auth.User
|
||||||
logic: l,
|
logic: l,
|
||||||
uniqueId: uniqueId,
|
uniqueId: uniqueId,
|
||||||
closeChan: make(chan struct{}, 1),
|
closeChan: make(chan struct{}, 1),
|
||||||
inChan: make(chan []byte, 100),
|
inChan: make(chan []byte, 500),
|
||||||
outChan: make(chan []byte, 100),
|
outChan: make(chan []byte, 500),
|
||||||
userId: userInfo.UserId,
|
userId: userInfo.UserId,
|
||||||
guestId: userInfo.GuestId,
|
guestId: userInfo.GuestId,
|
||||||
renderProperty: renderProperty{
|
renderProperty: renderProperty{
|
||||||
renderImageTask: make(map[string]*renderTask),
|
renderImageTask: make(map[string]*renderTask),
|
||||||
renderImageTaskCtlChan: make(chan renderImageControlChanItem, 100),
|
renderImageTaskCtlChan: make(chan renderImageControlChanItem, 500),
|
||||||
renderChan: make(chan []byte, 100),
|
renderChan: make(chan []byte, 500),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
//保存连接
|
//保存连接
|
||||||
|
@ -350,6 +350,6 @@ func (w *wsConnectItem) dealwithReciveData(data []byte) {
|
||||||
case constants.WEBSOCKET_REQUEST_REUSE_LAST_CONNECT:
|
case constants.WEBSOCKET_REQUEST_REUSE_LAST_CONNECT:
|
||||||
w.reuseLastConnect(d)
|
w.reuseLastConnect(d)
|
||||||
default:
|
default:
|
||||||
|
logx.Error("未知消息类型:", parseInfo.T)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,15 +20,8 @@ import (
|
||||||
// 云渲染属性
|
// 云渲染属性
|
||||||
type renderProperty struct {
|
type renderProperty struct {
|
||||||
renderImageTask map[string]*renderTask //需要渲染的图片任务 key是taskId val 是renderId
|
renderImageTask map[string]*renderTask //需要渲染的图片任务 key是taskId val 是renderId
|
||||||
renderImageTaskCtlChan chan renderImageControlChanItem //渲染任务新增移除的控制通道
|
renderImageTaskCtlChan chan renderImageControlChanItem //渲染任务新增/回调结果移除任务/更新渲染耗时属性的控制通道(由于任务map无法读写并发)
|
||||||
renderChan chan []byte //渲染的缓冲队列
|
renderChan chan []byte //渲染消息入口的缓冲队列
|
||||||
}
|
|
||||||
type renderTask struct {
|
|
||||||
RenderId string //渲染id(前端传的)
|
|
||||||
CombineBeginTime int64 //合图开始时间
|
|
||||||
CombineEndTime int64 //合图结束时间
|
|
||||||
UnityRenderBeginTime int64 //发送给unity时间
|
|
||||||
UnityRenderEndTime int64 //unity回调结果时间
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 渲染任务新增移除的控制通道的数据
|
// 渲染任务新增移除的控制通道的数据
|
||||||
|
@ -40,6 +33,15 @@ type renderImageControlChanItem struct {
|
||||||
TaskProperty renderTask //渲染任务的属性
|
TaskProperty renderTask //渲染任务的属性
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 渲染任务属性
|
||||||
|
type renderTask struct {
|
||||||
|
RenderId string //渲染id(前端传的)
|
||||||
|
CombineBeginTime int64 //合图开始时间
|
||||||
|
CombineEndTime int64 //合图结束时间
|
||||||
|
UnityRenderBeginTime int64 //发送给unity时间
|
||||||
|
UnityRenderEndTime int64 //unity回调结果时间
|
||||||
|
}
|
||||||
|
|
||||||
// 发送到渲染缓冲池
|
// 发送到渲染缓冲池
|
||||||
func (w *wsConnectItem) sendToRenderChan(data []byte) {
|
func (w *wsConnectItem) sendToRenderChan(data []byte) {
|
||||||
select {
|
select {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user