Page 1 of 1

Changed keepAlive. Suggesting it be in next Winboard release

PostPosted: 17 Sep 2010, 23:53
by netiad
The current -keepAlive M command will send the date command to fics every M minutes. The purpose is to keep your connection with fics alive.

The problem is the ICS interaction window get's clutters up with date replies.

example:

personA(50): dialog
Local time - Fri Sep 17, 15:45 PDT 2010
Server time - Fri Sep 17, 15:45 PDT 2010
GMT - Fri Sep 17, 22:45 GMT 2010
personA(50): dialog
Local time - Fri Sep 17, 15:45 PDT 2010
Server time - Fri Sep 17, 15:45 PDT 2010
GMT - Fri Sep 17, 22:45 GMT 2010
Local time - Fri Sep 17, 15:45 PDT 2010
Server time - Fri Sep 17, 15:45 PDT 2010
GMT - Fri Sep 17, 22:45 GMT 2010
personA(50): dialog
Local time - Fri Sep 17, 15:45 PDT 2010
Server time - Fri Sep 17, 15:45 PDT 2010
GMT - Fri Sep 17, 22:45 GMT 2010
personB(50): dialog
Local time - Fri Sep 17, 15:45 PDT 2010
Server time - Fri Sep 17, 15:45 PDT 2010
GMT - Fri Sep 17, 22:45 GMT 2010
Local time - Fri Sep 17, 15:45 PDT 2010
Server time - Fri Sep 17, 15:45 PDT 2010
GMT - Fri Sep 17, 22:45 GMT 2010
Local time - Fri Sep 17, 15:45 PDT 2010
Server time - Fri Sep 17, 15:45 PDT 2010
GMT - Fri Sep 17, 22:45 GMT 2010
Local time - Fri Sep 17, 15:45 PDT 2010
Server time - Fri Sep 17, 15:45 PDT 2010
GMT - Fri Sep 17, 22:45 GMT 2010

Instead of sending the date command to fics every M minutes send a newline '\n'. This keeps the same functionality of keeping your connection alive. The following example is the same scenario as above except with '\n' being sent to ics instead of date. You can see below how much more clear the ICS interaction window is.

example:

personA(50): dialog
personB(50): dialog
fics% fics%
personA(50): dialog
fics%
personB(50): dialog
fics% fics% fics% fics%

line of code to change in backend.c KeepAlive method:
SendToICS("date\n"); to SendToICS("\n");

I have tested and verified that my change works. I would like to submit my change. What are winboard's policies and rules for new developers who want to submit to the repository?

Re: Changed keepAlive. Suggesting it be in next Winboard rel

PostPosted: 18 Sep 2010, 09:43
by H.G.Muller
I am not sure what happened in your example: all the times are the same,like WinBoad is bombarding the ICS with multiple time commands within one minute. This seems like a clear bug. When you say -keepAlive 30, not more than a single date command every 30 minutes, which would hardly clutter up the window.

Are you sure that a plain newline will work on every ICS? I thought that some (most?) ICS need a command to prevent them from timing out. I hardly ever use ICS. When people requested this feature, they explicitly asked for a command to be sent. Perhaps it would be better to send a non-existing command, like 'STAYALIVE'. Then people can alias it on the ICS to 'date'if the ICS needs a command, but also to something else (e.g. a silent command, or perhaps even to nothing). That seems more flexible.

Re: Changed keepAlive. Suggesting it be in next Winboard rel

PostPosted: 18 Sep 2010, 13:32
by netiad
my example is for ever 1 minute.

I play on ics daily and if I don't show activity around a minute then I will get auto logged off.

I'm positive it works. I've used it yesterday and it kept my connection alive for over an hour.

Re: Changed keepAlive. Suggesting it be in next Winboard rel

PostPosted: 18 Sep 2010, 14:02
by H.G.Muller
1) This is simply not true: I just logged on to FICS, gave a date command, then waited 4 minutes, (according to my watch and a second date command), and was still logged in...

2) If it were true, it would be a very weird for a policy for any ICS. You can select games with a duration of upto 90 min, and in such a game it would be quite normal to think opto 5 minutes on a single move, and longer than a minute on almost every move.

3) Even if this helps against you being logged off after a minute, this is not a valid test to see if it helps against the ICS timeout, as that only kicks in after about 1hour (or 30min?). That you could stay on for an hour is because the ICSwould allow it anyway. I can stay on for an hour without doing anything, and on my own ICS even for 10 hours (because I increased the timeout period there).

4) The example does not seem forevery minute: it says 15:45 every time. So it must all be within the same minute. This is not what is supposed to happen for any setting of-keepAlive.

5) Did it work on ICC?

Re: Changed keepAlive. Suggesting it be in next Winboard rel

PostPosted: 18 Sep 2010, 15:03
by netiad
1) The magic number for me appears to be 4. It seemed shorter but I clocked it today. After logging in, being away from the computer for 4 minutes then returning and typing the finger command logs me off. I'm not sure why my inactivity time out is so short. I'm going to look into this.

2) It would be a weird policy to log you out for being inactive while your actively playing a game. The max time limit for a game on FICS is 999 minutes or 16.65 hours.

3) I agree.

4) The example was a scenario I experience over a time period of 8 minutes but didn't have the results on hand during this post so I reproduced it.

5) I've only tested it on FICS, I don't have an ICC account but I can sign-up for a free trial to test it. What chess servers do you test against?

Re: Changed keepAlive. Suggesting it be in next Winboard rel

PostPosted: 18 Sep 2010, 16:19
by H.G.Muller
If you are logged out after 4 min, it is not FICS that is doing it. I tested on FICS today, logging on, and then doing absolutely nothing. Channel 53 chatter kept appearing in the ICS window for 60 min, and after that the FICS logout screen appeared with the message above it: "you have been idle for 60 minutes". So theremust be something wrong with your TCP/IP drivers, router, modem or provider if your connection is cut before that. It is of course very nice if sending newlines can cure that, but it is no prove at all that it helps against the ICS timeout. For that, you must be able to stay significantly longer than an hour on FICS and ICC, and for more than 10 hours on my ICS.

I have an ICC account, and can test there. But I don't willhave time to do it before I return from Japan.

Officially WinBoard supports FICS (both freechess.org and the open-source version) and ICC, so everything would have to be tested on all three.