change nodejs base image..

This commit is contained in:
zizifn
2023-05-08 06:23:35 +08:00
committed by zizifn
parent bb30c69474
commit a67ac7f58e
4 changed files with 21 additions and 5 deletions

View File

@@ -339,11 +339,14 @@ function makeUDPSocketStream(portRemote, address) {
/* … */
udpClient.on('message', (message, info) => {
console.log(
'udp package received',
`udp package received ${info.size} bytes from ${info.address}:${info.port}`,
Buffer.from(message).toString('hex')
);
controller.enqueue(
Buffer.concat([new Uint8Array([0, info.size]), message])
Buffer.concat([
new Uint8Array([(info.size >> 8) & 0xff, info.size & 0xff]),
message,
])
);
});
udpClient.on('error', (error) => {