diff --git a/src/lib/socket-device.ts b/src/lib/socket-device.ts index 940a0be6f773d787dd41d639cf417058f7a58a48..21970f02140af3f23c127b5b6d86753e4cceae2a 100644 --- a/src/lib/socket-device.ts +++ b/src/lib/socket-device.ts @@ -1,3 +1,4 @@ +import { sbbsdefs } from '@swag/ts4s'; import Device from './device'; import { CONNECT_TIMEOUT } from './defs'; @@ -60,10 +61,12 @@ export default class SocketDevice extends Device { if (!this.socket.data_waiting) return; + this.log(sbbsdefs.LOG_DEBUG, `reading ${this.socket.nread} bytes from device`); const buf = []; while (this.socket.data_waiting) { buf.push(this.socket.recvBin(1)); } + this.log(sbbsdefs.LOG_DEBUG, `read ${buf.length} bytes from device`); const data = new Uint8Array(buf); return data;