[En-Nut-Discussion] NutTcpAccept blocks the tread

Henrik Maier hmnews at proconx.com
Tue Oct 20 23:35:25 CEST 2009


Hi Ole,

> -----Original Message-----
> From: en-nut-discussion-bounces at egnite.de [mailto:en-nut-discussion-
> bounces at egnite.de] On Behalf Of Ole Reinhardt
> Sent: Tuesday, 20 October 2009 8:29 PM
> To: Ethernut User Chat (English)
> Subject: Re: [En-Nut-Discussion] NutTcpAccept blocks the tread
>
> Might this patch be interesting to include in the main code? Perhaps we
> should review it and include it?

It is a very simple patch. Here is my post "NutTcpAccept() time-out
proposal" with the patch from March 2006:

"NutTcpAccept() does currently not honour any socket time-outs. It might be
useful for applications to perform some error management in case no server
connects within a given time.

I propose to change tcpsm.c so NutTcpAccept honours the read time-out.
In NutTcpStatePassiveOpenEvent change:

     NutEventWait(&sock->so_pc_tq, 0);
     return 0;

to:
     return NutEventWait(&sock->so_pc_tq, sock->so_read_to);
"

There has been a lot of discussion about this topic already in 2006. Refer
to these discussion threads:

http://lists.egnite.de/pipermail/en-nut-discussion/2006-March/006272.html
http://lists.egnite.de/pipermail/en-nut-discussion/2006-July/006745.html

Harald finally agreed to this implementation:

http://lists.egnite.de/pipermail/en-nut-discussion/2006-July/006829.html

But I never got around to implement it that way and to put it into the CVS.

Regards

Henrik








More information about the En-Nut-Discussion mailing list