No error while sending via TCP Socket

cmdrrickhunter@yaho.com conrad.ammon at gmail.com
Mon Jul 3 05:35:13 EDT 2006


Q: I have been looking through Volume 1 & 2 on the topics of TCP
timeouts. I have been looking in the section on "Timeout And
Retransmission" where you talk about round trip times. My question to
you would be what would make a tcp connection timeout? Is there a
certain number of retries that need to happen before a timeout?

A: TCP does not define a maximum number of retransmissions before
giving up. However, it does define a maximum segment lifetime, and
assumes that no response within two maximum segment lifetimes indicates
a hopeless situation. Thus, if one attempts to communicte with a
machine that is down, TCP will give up after retransmitting for about 5
minutes

Copied from a FAQ.

TCP will not let you know that the socket is down until you try to send
or recieve on the socket.  At that time a socket error will occur.

And unless he has odd gear, the nagle algorithm will not hold a packet
back if there's no packets still being transmitted (ack pairs haven't
been received).  I've had one radio which repackaged things funny, but
the data still got through, it just took some time.




More information about the Python-list mailing list