[En-Nut-Discussion] Telnet connection state check

Damian Slee Damian at commtech.com.au
Sat Apr 30 18:48:05 CEST 2005


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




More information about the En-Nut-Discussion mailing list