-
console.inkey() timeout on slow connections
From
Nightfox@VERT/DIGDIST to
All on Sun Sep 27 13:31:05 2009
Hi all -ããI have a login matrix script that I've written in JavaScript, where I useãconsole.inkey() to get a keypress from the user with an input timeout. I'mãusing a timeout of 60000ms (so, it should time out after 60 seconds). It worksãfine with a fast internet connection, but I've noticed that if I log into myãBBS from a computer with a fairly slow connection (i.e., satellite internetãconnection with a fairly slow upload rate), it times out immediately. Is thereãa workaround for this?ããNightfoxãã---ã þ Synchronet þ Digital Distortion BBS: digdist.bbsindex.comã
-
From
esc@VERT/MONTEREY to
Nightfox on Sun Sep 27 20:02:26 2009
Re: console.inkey() timeout on slow connectionsã By: Nightfox to All on Sun Sep 27 2009 01:31 pmãã > I have a login matrix script that I've written in JavaScript, where I useã > console.inkey() to get a keypress from the user with an input timeout. I'mã > using a timeout of 60000ms (so, it should time out after 60 seconds). It woã > fine with a fast internet connection, but I've noticed that if I log into myã > BBS from a computer with a fairly slow connection (i.e., satellite internetã > connection with a fairly slow upload rate), it times out immediately. Is theã > a workaround for this?ããHere's what I use. Keep in mind this is ripped from ispy/tracker1's code ofãthe phoenix modded s3 shell script.ããvar c = console.inkey();ãif (c == "") {ã sleep(100);ã}else{ãDetermine key pressed, etc etc etc.ããHope that helped man.ããesc(montereybbs/demonic/mimic)ãã---ã þ Synchronet þ :: montereybbs.com ::ã
-
From
Deuce@VERT/SYNCNIX to
Nightfox on Mon Sep 28 12:21:51 2009
Re: console.inkey() timeout on slow connectionsã By: Nightfox to All on Sun Sep 27 2009 01:31 pmãã > I have a login matrix script that I've written in JavaScript, where I useã > console.inkey() to get a keypress from the user with an input timeout. I'mã > using a timeout of 60000ms (so, it should time out after 60 seconds). Itã > works fine with a fast internet connection, but I've noticed that if I logã > into my BBS from a computer with a fairly slow connection (i.e., satelliteã > internet connection with a fairly slow upload rate), it times outã > immediately. Is there a workaround for this?ããWhat is the return value? Is it possible that there were simply keys stillãpending on the socket?ããPlease report bugs instead of working around them. :-)ãã--- ãSynchronet - Jump on the Web 0.2 bandwagon!ãã---ã þ Synchronet þ My Brand-New BBS (All the cool SysOps run STOCK!)ã
-
From
Deuce@VERT/SYNCNIX to
esc on Mon Sep 28 12:22:29 2009
Re: console.inkey() timeout on slow connectionsã By: esc to Nightfox on Sun Sep 27 2009 08:02 pmãã > Here's what I use. Keep in mind this is ripped from ispy/tracker1's codeã > of the phoenix modded s3 shell script.ã >ã > var c = console.inkey();ã > if (c == "") {ã > sleep(100);ã > }else{ã > Determine key pressed, etc etc etc.ããThis is the wrong way to do it now... using a timeout is correct (and just asãlikely to work as the other).ãã--- ãSynchronet - Jump on the Web 0.2 bandwagon!ãã---ã þ Synchronet þ My Brand-New BBS (All the cool SysOps run STOCK!)ã
-
From
Nightfox@VERT/DIGDIST to
Deuce on Mon Sep 28 15:31:05 2009
Re: console.inkey() timeout on slow connectionsã By: Deuce to Nightfox on Mon Sep 28 2009 12:21:51ãã > > What is the return value? Is it possible that there were simply keys stiã > > pending on the socket?ã > > ã > > Please report bugs instead of working around them. :-)ããI do prefer to report bugs rather than working around them. :) I'm not aroundãthat computer with the slow connection now, so I'll have to find a way toãsimulate a slow internet connection with my BBS so I can do some more testing.ããNightfoxãã---ã þ Synchronet þ Digital Distortion BBS: digdist.bbsindex.comã