chore: remove UDP console log

This commit is contained in:
zizifn
2023-05-12 22:30:54 +08:00
committed by zizifn
parent 6235ecfb17
commit 258fd97b6e
3 changed files with 19 additions and 13 deletions

View File

@@ -343,10 +343,10 @@ function makeUDPSocketStream(portRemote, address) {
start(controller) {
/* … */
udpClient.on('message', (message, info) => {
console.log(
`udp package received ${info.size} bytes from ${info.address}:${info.port}`,
Buffer.from(message).toString('hex')
);
// console.log(
// `udp package received ${info.size} bytes from ${info.address}:${info.port}`,
// Buffer.from(message).toString('hex')
// );
controller.enqueue(
Buffer.concat([
new Uint8Array([(info.size >> 8) & 0xff, info.size & 0xff]),
@@ -377,10 +377,10 @@ function makeUDPSocketStream(portRemote, address) {
controller.error(`Failed to send UDP packet !! ${err}`);
safeCloseUDP(udpClient);
}
console.log(
'udp package sent',
Buffer.from(udpData).toString('hex')
);
// console.log(
// 'udp package sent',
// Buffer.from(udpData).toString('hex')
// );
resolve(true);
});
});