Sponge
CS144's user-space TCP library
|
Summary of a TCPConnection's internal state. More...
#include <tcp_state.hh>
Static Public Member Functions | |
static std::string | state_summary (const TCPReceiver &receiver) |
Summarize the state of a TCPReceiver in a string. More... | |
static std::string | state_summary (const TCPSender &receiver) |
Summarize the state of a TCPSender in a string. More... | |
Summary of a TCPConnection's internal state.
Most TCP implementations have a global per-connection state machine, as described in the TCP specification. Sponge is a bit different: we have factored the connection into two independent parts (the sender and the receiver). The TCPSender and TCPReceiver maintain their interval state variables independently (e.g. next_seqno, number of bytes in flight, or whether each stream has ended). There is no notion of a discrete state machine or much overarching state outside the sender and receiver. To test that Sponge follows the TCP spec, we use this class to compare the "official" states with Sponge's sender/receiver states and two variables that belong to the overarching TCPConnection object.
Definition at line 23 of file tcp_state.hh.
|
static |
Summarize the state of a TCPReceiver in a string.
Definition at line 5 of file tcp_state.cc.
Summarize the state of a TCPSender in a string.
Definition at line 17 of file tcp_state.cc.