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]; //流水号