Is there a way in JS to detect the speed of a telnet or RLogin connection?
I see that there's system.node_list[0].connection, but this seems to always return 65534 if I connect by telnet, even if I set SyncTerm to 19,200bps.
I see that there's system.node_list[0].connection, but this seems to
always return 65534 if I connect by telnet, even if I set SyncTerm
to 19,200bps.
Same thing if I connect with an old Atari ST using a Lantronix
telnet-to-serial device at 19.2.
So if you're connected on Syncterm you'll get data as fast as possible.
Syncterm can be throttled to simulate different speeds
Crap, my remote to my BBS isn't working at the moment. I'll get the code if you want it, not too complicated. as i recal you have to load ansi.js to get the function. Maybe look there?
Is there a way in JS to detect the speed of a telnet or RLogin
connection?
I'm not sure if there's a way to detect the connection speed, but regarding SyncTerm, I would guess that its speed is just simulated in that it probably still sends and receives at full speed and just simulates displaying the data at a slower speed.
// If the terminal is any version of SyncTERM
if (typeof console.cterm_version != 'undefined') {
Ansi.send("speed", "set", 8);
// 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
// 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 76800,
115200
// Reset to normal speed
if (typeof console.cterm_version != 'undefined') {
Ansi.send("speed", "clear");
--
Dunno if this will do it for you, it doesn't really slow down your bbs, just slows down the terminal.
Sure, I imagine both SyncTerm and a Lantronix box are probably simulating the slower speed in some way, but surely there's a way that could be measured or detected by the BBS, right?
Kirkman wrote to Android8675 on 05-21-18 13:00 <=-
Re: Telnet/Rlogin speed?
By: Android8675 to Kirkman on Mon May 21 2018 08:43 am
// If the terminal is any version of SyncTERM
if (typeof console.cterm_version != 'undefined') {
Ansi.send("speed", "set", 8);
// 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
// 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 76800,
115200
// Reset to normal speed
if (typeof console.cterm_version != 'undefined') {
Ansi.send("speed", "clear");
--
Dunno if this will do it for you, it doesn't really slow down your bbs, just slows down the terminal.
This is not *quite* what I'm asking for, but it's in the right
direction.
I don't want to slow the terminal down, but instead to find out if
the user's telnet connection is ALREADY slowed down either because the user changed the speed of SyncTerm, or they are using a Lantronix connected to a retrocomputer.
Now that you've posted that code, I'm guessing the cterm library may
have a method that returns the terminal's current speed?
Is there a way in JS to detect the speed of a telnet or RLogin connection?
I see that there's system.node_list[0].connection, but this seems to always return 65534 if I connect by telnet, even if I set SyncTerm to 19,200bps.
Same thing if I connect with an old Atari ST using a Lantronix telnet-to-serial device at 19.2.
So even if you could somehow test the connection and determine its speed upon connect, it would likely change (up and down) later. RLogin does include an optional terminal speed field, but its not really relevant or useful over the Internet.
This is not *quite* what I'm asking for, but it's in the right direction.
Now that you've posted that code, I'm guessing the cterm library may have a method that returns the terminal's current speed?
Re: Telnet/Rlogin speed?
By: Nightfox to Kirkman on Fri May 18 2018 01:26 pm
Is there a way in JS to detect the speed of a telnet or RLogin
connection?
I'm not sure if there's a way to detect the connection speed, but regarding SyncTerm, I would guess that its speed is just simulated in that it probably still sends and receives at full speed and just simulates displaying the data at a slower speed.
Sure, I imagine both SyncTerm and a Lantronix box are probably simulating the slower speed in some way,
but surely there's a way that could be measured or detected by the BBS, right?
Re: Telnet/Rlogin speed?
By: Digital Man to Kirkman on Mon May 21 2018 04:50 pm
So even if you could somehow test the connection and determine its speed upon connect, it would likely change (up and down) later. RLogin does include an optional terminal speed field, but its not really relevant or useful over the Internet.
I guess what I'm looking for is not necessarily an exact bits-per-second, but just the difference between someone who's connecting over telnet with a Lantronix at 57.6k or slower, versus someone using a plain terminal at normal telnet speeds.
Is there an ANSI sequence I could send through Javascript that returns an automatic response from the remote terminal, and I could time that?
Digital Man wrote to Kirkman <=-
Is there a way in JS to detect the speed of a telnet or RLogin connection?
No. Unlike in the old days of the circuit-switched telephone network
where you could get a guaranteed consistent rate, there's no equivalent over the Internet where through-put of an individual TCP session (e.g. Telnet, RLogin) can change at any time depending on an unbounded number
of factors.
It's quite instructive to do an Internet speed test at a server on the other side of the world. Ahile I may get up to 80 Mbps from the nearest servers, I only get 3-5Mbps from servers in continental Europe.
Kirkman wrote to Vk3jed <=-
It's quite instructive to do an Internet speed test at a server on the other side of the world. Ahile I may get up to 80 Mbps from the nearest servers, I only get 3-5Mbps from servers in continental Europe.
Fair point, but 3-5Mbps is still an order of magnitude beyond a retrocomputer on a Lantronix at 57.6 or 19.2 kbps.
So, eChicken gave me the .js code to change speeds. I modified my logon.js
So, eChicken gave me the .js code to change speeds. I modified my
logon.js
I'm late in replying to this, but FWIW there are now some JS libraries in CVS that will help with this. I believe the relevant stuff is in exec/load/ansiterm_lib.js.
Sysop: | Ree |
---|---|
Location: | Toronto, ON |
Users: | 2 |
Nodes: | 10 (0 / 10) |
Uptime: | 144:06:17 |
Calls: | 369 |
Files: | 2 |
Messages: | 38,456 |