Greetings, Group!
When connect() is called, the TCP/IP stack makes variable tcp_syn_retries
number of SYN retries which are approximately from 40 to 50 seconds apart which
means minimu number of seconds between _meaningfully_ calling connect() is
about 180 seconds.
connect() under TS-Linux for the same IP/TCP Port number while there are
pending SYN retries appears to cause problems, at least it does for me.
Retried SYNs appear to stop being sent if a connect() is called 10 seconds in
to a previous connect()'s retry period.
Anyone else notice that behavior?
What I did was I echo 1 > /proc/sys/net/ipv4/tcp_syn_retries prior to calling
connect() then I echo 5 back in afterwards. The control block for the TCP
connection attempt gets initialized to 1 so that my calling connect() every 10
seconds actually works.
Also I noticed that calling close() on a sock that's in SYN_SENT state does not
immediately force the TCP/IP stack to leave that state -- which was surprising.
Does anyone have a better solution? I want to be able to perform one single
SYN according to a configurable period of time, I don't want retries to be
performs.
Thanks!
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|