Subj : Is there a bug in Socket.data_waiting ?
To : Digital Man
From : nelgin
Date : Thu Feb 22 2024 12:42 am
Re: Is there a bug in Socket.data_waiting ?
By: Digital Man to nelgin on Wed Feb 21 2024 20:24:51
'use strict';
load("sbbsdefs.js");
load('sockdefs.js');
var sock = new Socket();
if(!sock.connect('vert.synchro.net',23)) {
writeln('Connect failure ' + sock.error_str);
exit(1);
}
writeln("ic: " + sock.is_connected);
print(JSON.stringify(sock, null, 4));
So, if I go with this:
ic: true
"error_str": "Success",
"is_writeable": true,
"is_writable": true,
"data_waiting": false,
"nread": 0,
Shouldn't matter if I'm not in a loop right? When I connect the a socket there's data waiting for me as evidenced by netcat.
$ nc vert.synchro.net 23
Synchronet BBS for Win32 Version 3.20
Telnet connection from: 192.138.210.158
Resolving hostname...
�������� ������'
_ _
Synchronet BBS for Win32 Version 3.20 Copyright 2022 Rob Swindell
^[[?6c^[[49;98R^[[49;1R^C
INterestingly, it seems vert does telnet negotiation after already sending some text.
---
� Synchronet � End Of The Line BBS - endofthelinebbs.com