Author Topic: Can I disable telnet idle timeout?  (Read 4861 times)

Offline alager

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Can I disable telnet idle timeout?
« 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

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3069
    • View Profile
    • uTasker
Re: Can I disable telnet idle timeout?
« Reply #1 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
                    }