[En-Nut-Discussion] NutTcpAccept() timeout

Harald Kipp harald.kipp at egnite.de
Thu Jul 6 10:16:44 CEST 2006


Don,

IMHO I never really agree to a timeout requirement for connect()
or accept(). Anyway, I agree that there may be specific reasons
for implementing this.

If you don't care modifying the TCP stack, you may follow a previous
post from Henrik Maier:

>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);

If I'm the only one with concerns, I can add it. I still think
that it is useless, not required and not following the standard,
but actually it won't hurt either.

Harald




More information about the En-Nut-Discussion mailing list