Skip to content
Snippets Groups Projects
Commit f7211dbd authored by echicken's avatar echicken :chicken:
Browse files

Some debug output that should probably be removed before long.

parent 9a36e63d
Branches
No related tags found
No related merge requests found
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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment