From e9c5e96c52e1444026bda0ac25f14847dde15fcb Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Mon, 7 Aug 2023 13:17:23 +0800 Subject: [PATCH] fix --- server/render/etc/render.yaml | 2 +- server/websocket/internal/logic/datatransferlogic.go | 7 ++++--- server/websocket/internal/logic/ws_render_image_logic.go | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/server/render/etc/render.yaml b/server/render/etc/render.yaml index 30b4cdd7..d0f93153 100644 --- a/server/render/etc/render.yaml +++ b/server/render/etc/render.yaml @@ -1,6 +1,6 @@ Name: render Host: 0.0.0.0 -Port: 8888 +Port: 9919 SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest Auth: AccessSecret: fusen2023 diff --git a/server/websocket/internal/logic/datatransferlogic.go b/server/websocket/internal/logic/datatransferlogic.go index ab215c78..670d5938 100644 --- a/server/websocket/internal/logic/datatransferlogic.go +++ b/server/websocket/internal/logic/datatransferlogic.go @@ -270,9 +270,10 @@ func (w *wsConnectItem) dealwithReciveData(data []byte) { d, _ := json.Marshal(parseInfo.D) //分消息类型给到不同逻辑处理,可扩展 switch parseInfo.T { - //图片渲染数据组装 - case constants.WEBSOCKET_RENDER_IMAGE_ASSEMBLE: - w.assembleRenderData(d) + //图片渲染 + case constants.WEBSOCKET_RENDER_IMAGE: + //数据组装 + w.renderImage(d) default: } diff --git a/server/websocket/internal/logic/ws_render_image_logic.go b/server/websocket/internal/logic/ws_render_image_logic.go index e4881bba..0b750cfb 100644 --- a/server/websocket/internal/logic/ws_render_image_logic.go +++ b/server/websocket/internal/logic/ws_render_image_logic.go @@ -22,7 +22,7 @@ type renderImageControlChanItem struct { } // 渲染发送到组装数据组装数据 -func (w *wsConnectItem) assembleRenderData(data []byte) { +func (w *wsConnectItem) renderImage(data []byte) { var renderImageData websocket_data.RenderImageReqMsg if err := json.Unmarshal(data, &renderImageData); err != nil { w.outChan <- w.respondDataFormat(constants.WEBSOCKET_ERR_DATA_FORMAT, "invalid format of websocket render image message:"+string(data))