[En-Nut-Discussion] Telnet connection state check

Brett Abbott Brett.Abbott at digital-telemetry.com
Sun May 1 01:35:47 CEST 2005


Keep alive packets could be used.  These use sequence number-1 and most 
stacks simply absorb them.  Keep alive packets are optionally sent on a 
regular  basis if no traffic is passed through the connection  to keep 
comms and firewall links open.  Im unsure if NutOs has this built in.

Brett

Damian Slee wrote:

>This is more an issue with TCP, if it isnt sending any data, then it
>won't find out it is disconnected.  That is all data has been ACK'ed,
>and there is no FIN packet received cause the cable is unplugged.  Image
>talking on a telephone and someone cuts the cable.  The only way to
>determine your disconnected is to say hello a couple of times with no
>response.
>
>If for example your telnet app in ethernut was to send some data then
>TCP would timeout retrying and close.
>
>Or you implement an inactivity timer in your ethernut app, to kill the
>connection if no user input has been received in 30seconds for example.
>
>-----Original Message-----
>From: en-nut-discussion-bounces at egnite.de
>[mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of Andrea
>Cannavicci
>Sent: Saturday, April 30, 2005 6:39 PM
>To: Ethernut User Chat (English)
>Subject: [En-Nut-Discussion] Telnet connection state check
>
>Hi,
>
>I'm using the ethernut tcp telnet connection.
>All works fine but I need to check the connection status.
>
>In the particular case I have this situation.
>
>- I connect the telnet client from a remote pc
>- I keep the connection alive for an undefinite time
>- If the network go down (e.g. someone disconnect the pc ethernet cable
>or cut the pc power off without disconnecting telnet connection)
>   the ethernut board keep the connection active. When I try to connect
>again the connection is refused.
>   The only thing I can do is hardware reset of the ethernut board.
>
>How can I monitor the telnet connection to verify if the pc is still
>connected or not?
>In this case I have to disconnect the telnet client and to restart
>listen for an incoming connection
>
>Thanks in advance
>
>_______________________________________________
>En-Nut-Discussion mailing list
>En-Nut-Discussion at egnite.de
>http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>
>_______________________________________________
>En-Nut-Discussion mailing list
>En-Nut-Discussion at egnite.de
>http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>
>
>  
>

-- 
-----------------------------------------------------------------
Brett Abbott, Managing Director, Digital Telemetry Limited
Email: Brett.Abbott at digital-telemetry.com
PO Box 24 036 Manners Street, Wellington, New Zealand
Phone +64 (4) 5666-860  Mobile +64 (21) 656-144
------------------- Commercial in confidence --------------------






More information about the En-Nut-Discussion mailing list