Board index » delphi » Telenet Client and reconnect
German Gentile
![]() Delphi Developer |
German Gentile
![]() Delphi Developer |
Telenet Client and reconnect2004-05-21 09:31:54 PM delphi267 How to detect a physical failure or disconnect and reconnect a telnet client to a telnet server? Always supossing the server also detectes the failure and close the session and is ready to reopen one when the client ask for it. TIA -- German Pablo Gentile (From Argentina) |
Martin James
![]() Delphi Developer |
2004-05-22 12:43:27 AM
Re:Telenet Client and reconnect
"German Gentile" <XXXX@XXXXX.COM>writes
QuoteHow to detect a physical failure or disconnect and reconnect a telnet just makes the ends unreachable is more of a problem. Nowt for it but to periodically ask the other end if it is still there. AFAIK, there is a telnet command sequence that can be used to do this, but I can't remember off-hand what it is. Look up the telnet protocol on google & find out some innocuous command that just elicits a response. You can then use readTimeouts and a local 'awaiting poll rsponse' flag to allow both client & server to detect unreachability reasonably quickly. Always supossing the server also detectes the Quotefailure and close the session and is ready to reopen one when the client to another telnet session. Rgds, Martin |