Home |
Sockets, IP, and Port Addresses Blocking and Non-Blocking Sockets TCP Retransmission |
TCP RetransmissionIf data sent has not been acknowledged within a certain time frame, which is a multiple of RTT, the data is retransmitted to the remote host. The retransmission timeout starts out at the RTT and is doubled with each retransmission. The retransmission timeout is always limited within CFG_MINRTO and CFG_MAXRTO. If CFG_RETRANS_TMO time elapses since the data was first transmitted, the connection is closed, i.e. the state is set to CLOSED. Note that when a socket is closed, a reset will be sent in response to any packets received destined for the port. When a timeout occurs, all the unacknowledged data in the output window is retransmitted. The data is repackaged; therefore, the packets will not be identical to the original packets. For example, if a packet is sent with 10 bytes of data, then a packet with 30 bytes of data is sent and the first packet is lost, 40 bytes of unacknowledged data will be in the output window. When a timeout occurs, all 40 bytes will be sent in one packet (assuming the MSS is greater than or equal to 40). The Fast Retransmission algorithm retransmits TCP data without waiting for a timeout if three duplicate acknowledgments are received. RTIP-32 also implements the NewReno Fast Recovery Algorithm as defined in RFC 2582.
|