Subj : Is there a bug in Socket.data_waiting ? To : Digital Man From : nelgin Date : Wed Feb 21 2024 01:52 pm Re: Is there a bug in Socket.data_waiting ? By: Digital Man to nelgin on Wed Feb 21 2024 11:25:52 > > now if I use sock.recvline I get a line of data. So if there's data > > waiting, why wouldn't data_waiting tell me? > > I would expect data_waiting to be true. Definately false. $ cat socktest.js 'use strict'; load("sbbsdefs.js"); load('sockdefs.js'); var sock = new Socket(SOCK_STREAM); try { sock.connect('aardmud.org',4000,5) } catch(e) { writeln(e); exit(); } writeln("data? " + sock.data_waiting); sock.close(); bbs@bbs:/sbbs/xtrn/mudlist/scripts$ jsexec -n socktest.js data? false > It might be best to figure out what that initial handshake is and deal with > that first. I did find the telnet negotiation strings in the end, they were a bit buried, so that is sorted. --- þ Synchronet þ End Of The Line BBS - endofthelinebbs.com .