[En-Nut-Discussion] NutTcpConnect() with timeout
Henrik Maier
hmnews at proconx.com
Thu Sep 26 02:24:20 CEST 2013
Hi Ole,
I support this feature and actually already made an unpublished patch to
NutTcpStateActiveOpenEvent to use sock->so_read_to.
So instead of:
if(sock->so_state == TCPS_SYN_SENT)
NutEventWait(&sock->so_ac_tq, 0);
I have:
if(sock->so_state == TCPS_SYN_SENT)
{
if (NutEventWait(&sock->so_ac_tq, sock->so_read_to))
return -1;
}
I did not come across any side effects and are using this approach
successfully.
Cheers,
Henrik
On 26/09/2013 9:09 AM, Ole Reinhardt wrote:
> Hi all,
>
> I do not know if we ever discussed this, but I did not find something
> related in my mail archive.
>
>
> Is there any way to introduce some timeout to NutTcpConnect()?
>
> I digged into the tcp statemachine and perhaps we could add a timeout by
> not waiting infinite in NutTcpStateActiveOpenEvent(), but I'm not sure
> about side effects in the tcp statemachine.
>
> Any ideas?
>
> Best regards,
>
> Ole
>
>
More information about the En-Nut-Discussion
mailing list