Commit 78ec8485 authored by Philip Withnall's avatar Philip Withnall Committed by Olivier Crête

pseudotcp: Shorten the TIME-WAIT state timeout dramatically

The TIME-WAIT timeout is typically 2×MSL (on the order of 60 seconds),
which is needed to be able to reject delayed segments from closed
conversations. However, the underlying socket layer for pseudo-TCP takes
care of channel numbering so that segments don’t end up being sent to
closed conversations. Therefore, the TIME-WAIT state can be eliminated
(by shortening the timeout). The code for the state is kept around so
that the pseudo-TCP implementation matches the TCP specification
correctly, which will simplify maintenance.
parent 0bd5acca
......@@ -202,9 +202,14 @@ typedef enum {
#define DEFAULT_TIMEOUT 4000
// If the connection is closed, once per minute
#define CLOSED_TIMEOUT (60 * 1000)
/* Timeout after reaching the TIME_WAIT state.
* See: RFC 1122, § */
/* Timeout after reaching the TIME_WAIT state, in milliseconds.
* See: RFC 1122, §
* XXX: Since we can control the underlying layer’s channel ID, we can guarantee
* delayed segments won’t affect subsequent connections, so can radically
* shorten the TIME-WAIT timeout (to the extent that it basically doesn’t
* exist). It would normally be (2 * TCP_MSL). */
// Helper Functions
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment