[En-Nut-Discussion] Webserver Image problem
Dusan Ferbas
dferbas at dfsoft.cz
Thu Dec 11 17:31:29 CET 2003
This can be called also a 'TCP sockets and FIN/RST packets' problem.
I have a tcpsm.c rev 1.6 with rentrasmition timer correction. But even with
this I encounter lost FIN.
Somebody earlier suggested 120 sec renewal period. I need 5 seconds.
The more packets are used for 1 html the more probable is FIN lost. In this
case TCP connection end looks like:
Nut < -- > Windows XP Pro
ACK, FIN -> (Nut initiated socket close)
<- ACK
<- ACK, FIN
missing FIN
<- ACK, FIN (rexmitted after 2.4 sec)
RST -> (it looks like socket has been closed and port no more exists)
I know that sockets are put to a close wait state to wait for last FIN.
This is usually called lingering (am I right ?). Then another socket is
created and closed socket is waiting until linger end. More complex
situation occures if TCP stream consists from a lot of small portions
(fprintf() reason - see previous email) and more threads with sockets are
opened.
Any idea ?
Dusan Ferbas
www.dfsoft.cz
More information about the En-Nut-Discussion
mailing list