I believe one of the things I need to change is the connect() call in tcp.c:tcp_connect(), to prevent a 15 minute delay in detecting loss of comm's with the RDP server. I would like to make the timeout a command line argument, so configurable via the script commands that invoke rdesktop.
Has anybody looked at making the tcp_connect() timeout shorter/configurable? I'm reading articles on it now, and am considering using an alarm per articles like this: http://www.developerweb.net/forum/archive/index.php/t-3001.html
I'm not a socket programmer, so would appreciate any other suggestions for more quickly detecting and responding to loss of connection to the RDP server.
From: Hybl, Larry
Sent: Tuesday, October 24, 2006 3:51 PM
Subject: rdesktop changes to support alternate server reconnect?
I need to change rdesktop and thinstation to support client reconnnection to an alternate server when the main RDP server is unavailable. I believe I understand how the thinstation scripts work; however, I believe I also need to change rdesktop.
If I disconnect the link to my RDP server, thinstation scripts do not initiate reconnection attempts until either a long timeout occurs (>= 15 minutes ?) or there is user activity. I need rdesktop to report connection loss much more quickly, and irrespective of whether there is user activity at the client, e.g. mouse clicks, keyboard activity, etc. An idle RDP session that is disconnected should cause rdesktop to throw a signal, exit with a status, etc. that the thinstation scripts could use to initiate alternate server connection.
I'm an rdesktop newbie. Any suggestions on where to start looking?