From f7211dbd9b200f9d1e376158b21f878b5ce2ea9f Mon Sep 17 00:00:00 2001 From: echicken <echicken@bbs.electronicchicken.com> Date: Sat, 27 Apr 2024 05:12:53 +0000 Subject: [PATCH] Some debug output that should probably be removed before long. --- src/lib/socket-device.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/socket-device.ts b/src/lib/socket-device.ts index 940a0be..21970f0 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; -- GitLab