µTasker Forum

µTasker Forum => µTasker general => Topic started by: alager on December 07, 2010, 05:43:12 PM

Title: Can I disable telnet idle timeout?
Post by: alager on December 07, 2010, 05:43:12 PM
Is there an easy way to disable the telnet idle timeout?  When I traced through the code, it looks like the value in the timeout is always evaluated for time, I didn't see a way to turn it off, or make it infinite.

Since we are using telnet as a machine interface, not just for humans, it would be nice be able to make it not time out.

Thanks,
Aaron
Title: Re: Can I disable telnet idle timeout?
Post by: mark on December 07, 2010, 11:27:31 PM
Hi Aaron

The value passed to TELNET is given on to the TCP socket.

If you pass INFINITE_TIMEOUT it will be infinite. See also http://www.utasker.com/docs/CodeDoc/fnGetTCP_Socket.htm

Regards

Mark

P.S. It is not that easy to see the place that this is done since the variable is passed on to TCP ones. It is in fact in fnPollTCP() in tcp.c

                    if (ptr_TCP->usLinkTimer != INFINITE_TIMEOUT) {      // if idle timer not disabled
                        ptr_TCP->usLinkTimer--;                          // count down idle period
                    }