From 9806ce8664d6c9e38451e7bddacc807ddabcfec4 Mon Sep 17 00:00:00 2001 From: surenjun Date: Wed, 5 Mar 2025 10:15:23 +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 | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/entry/src/main/ets/tcp2byte/index.ts b/entry/src/main/ets/tcp2byte/index.ts index 032f0474..d75c0240 100644 --- a/entry/src/main/ets/tcp2byte/index.ts +++ b/entry/src/main/ets/tcp2byte/index.ts @@ -88,12 +88,8 @@ function handSendMessage(client: socket.TCPSocket, type, data) { } //处理接收的数据 -function handReceiveMessage(client: socket.TCPSocket, sendData, rData):RES { - console.info(TAG, 'receiveData=>' + rData) - let receiveData = [] - for (let i = 0; i < rData.length; i++) { - receiveData.push(buffer[i]); - } +function handReceiveMessage(client: socket.TCPSocket, sendData, receiveData):RES { + //返回的消息类型 const messageType = receiveData[1]; //流水号