From d69b2e23e030602713336accc1bc9d386d7dcef7 Mon Sep 17 00:00:00 2001 From: surenjun Date: Wed, 5 Mar 2025 15:43:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E8=A1=A5=E5=8C=85=E5=BA=8F=E5=8F=B7?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/tcp2byte/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entry/src/main/ets/tcp2byte/index.ts b/entry/src/main/ets/tcp2byte/index.ts index bbc4dcc4..aefff462 100644 --- a/entry/src/main/ets/tcp2byte/index.ts +++ b/entry/src/main/ets/tcp2byte/index.ts @@ -114,8 +114,8 @@ function handReceiveMessage(client: socket.TCPSocket, sendData, rData: ArrayBuff const start = index * 2; const end = start + 1; const packageIndex = bytesToDecimal([packages[start],packages[end]]); - console.info(TAG, '补包内容' + JSON.stringify(new Uint8Array(sendData[packageIndex]))) - client.send({data:new Uint8Array(sendData[packageIndex]).buffer}); + console.info(TAG, '补包内容' + JSON.stringify(new Uint8Array(sendData[packageIndex-1]))) + client.send({data:new Uint8Array(sendData[packageIndex-1]).buffer}); }) } else { const decoder = util.TextDecoder.create('utf-8');