From 526faa97df38013ba1a5ffc927e1cc1de4939297 Mon Sep 17 00:00:00 2001 From: surenjun Date: Wed, 5 Mar 2025 10:16:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=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 d75c0240..4a280351 100644 --- a/entry/src/main/ets/tcp2byte/index.ts +++ b/entry/src/main/ets/tcp2byte/index.ts @@ -113,10 +113,10 @@ function handReceiveMessage(client: socket.TCPSocket, sendData, receiveData):RES }else{ const decoder = util.TextDecoder.create('utf-8'); const messageLength = bytesToDecimal([receiveData[9],receiveData[10]]); - const markLength = receiveData[11]; + const markLength = receiveData[11].buffer; const markContent = decoder.decodeWithStream(receiveData.slice(12, 12 + markLength )); console.info(TAG, 'markContent=>' + markContent) - const tipLength = receiveData[13]; + const tipLength = receiveData[13].buffer; const messageContent = decoder.decodeWithStream(receiveData.slice(13 + markLength, 13 + markLength + tipLength)); console.info(TAG, 'messageContent=>' + messageContent) return {