AW: [En-Nut-Discussion] Connection interrupt detection...

Czerteak czerteak at email.cz
Mon Oct 6 09:53:44 CEST 2003


Hi,

thanks for the tip but this is not exactly what I need. Consider this 
situation. The client program wakes up every second to process the data that 
waits in the input buffer. So the first change to send the "echo" is after 
that second of waiting. But the real situation is that the data arrives every 
50ms and the OS handles the the ACKs as soon as possible. In such case, when 
I unplugged the cable just in the middle of these one-second client program 
ticks I would have to wait half a second to be sure it's interrupted. 
Instead, when I used the ACK timeout method, the response would be MUCH 
quicked and that's what I need... I hope that was clear enough, my English 
ain't that good... :-)

Czerteak



> Hi Czerteak,
>
> maybe you can send "alive" -Characters from client to your server (you
> didn't tell if you need this direction), so you get a read-timeout on the
> server-side, if the client is not listening.
>
> Robert
>
> -----Ursprungliche Nachricht-----
> Von: en-nut-discussion-admin at egnite.de
> [mailto:en-nut-discussion-admin at egnite.de]Im Auftrag von Czerteak
> Gesendet: Montag, 6. Oktober 2003 00:32
> An: en-nut-discussion at egnite.de
> Betreff: [En-Nut-Discussion] Connection interrupt detection...
>
>
> Hi,
>
> I need to perform a specific task but I don't know how. :-( In my Ethernut,
> I
> have a program which acts as a TCP server. The client connects and starts
> to "listen" (just accepts data). The server serves the data in some
> interval (about 10 bytes every 50ms). I need to detect whether the client
> side is still listening. My idea was to change the socket timeout to some
> short time so the connection would be terminated automatically (if no ACK
> comes back in 50ms it's clear the other side is dead).
>
> Is it a good approach? It ithere a better solution? What should I change to
> shorten the timeout to such small value?
>
> Thanks...
> Czerteak
>
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo/en-nut-discussion
>
>
>
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo/en-nut-discussion




More information about the En-Nut-Discussion mailing list