AW: [En-Nut-Discussion] Timeout on TCP connect
olischulz at web.de
Mon Jun 14 21:27:39 CEST 2004
unfortunately there is (currently) no possibility to set a timeout for
During the connection establishing, Nut/OS tries four times to send an SYN
packet to the peer and waits 2 secs for a response after each transmission.
If Nut/OS receives no response after the retries, NutTcpConnect returns an
error and sets the socket error to ETIMEDOUT.
So we have an implicit timeout of 4 * 2 secs = 8 secs for NutTcpConnect.
You can find the timing in net/tcpsm.c (v 22.214.171.124.2.1), lines 1466 and
NutTcpConnect also returns an error if the TCP stack receives RST or FIN
segments from the peer during connection establishing.
Hope that helps,
> -----Ursprüngliche Nachricht-----
> Von: en-nut-discussion-bounces at egnite.de
> [mailto:en-nut-discussion-bounces at egnite.de]Im Auftrag von Michel
> Gesendet: Montag, 14. Juni 2004 14:32
> An: en-nut-discussion at egnite.de
> Betreff: [En-Nut-Discussion] Timeout on TCP connect
> Is there a way to set a timeout on NutTcpConnect()?
> Looking at the source I see that it returns on a connect or an error.
> What determines these errors? And, more importantly, where is
> the timing for this
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
More information about the En-Nut-Discussion