|
Sponge
CS144's user-space TCP library
|
Go to the documentation of this file. 1 #ifndef SPONGE_LIBSPONGE_TCP_STATE
2 #define SPONGE_LIBSPONGE_TCP_STATE
82 #endif // SPONGE_LIBSPONGE_TCP_STATE
const std::string SYN_SENT
@ SYN_RCVD
Got the peer's SYN.
const std::string FIN_SENT
bool operator!=(const TCPState &other) const
The "sender" part of a TCP implementation.
State
Official state names from the TCP specification.
TCPState(const TCPSender &sender, const TCPReceiver &receiver, const bool active, const bool linger)
Construct a TCPState given a sender, a receiver, and the TCPConnection's active and linger bits.
@ RESET
A connection that terminated abnormally.
const std::string FIN_RECV
@ TIME_WAIT
Both sides have sent FIN and ACK'd, waiting for 2 MSL.
@ LAST_ACK
Local side sent a FIN from CLOSE_WAIT, waiting for ACK.
@ LISTEN
Listening for a peer to connect.
The "receiver" part of a TCP implementation.
@ CLOSE_WAIT
Remote side has sent a FIN, connection is half-open.
@ CLOSED
A connection that has terminated normally.
@ ESTABLISHED
Three-way handshake complete.
Summary of a TCPConnection's internal state.
bool operator==(const TCPState &other) const
@ CLOSING
Received a FIN just after we sent one.
bool _linger_after_streams_finish
@ FIN_WAIT_2
Received an ACK for previously-sent FIN.
@ FIN_WAIT_1
Sent a FIN to the remote side, not yet ACK'd.
const std::string SYN_RECV
std::string name() const
Summarize the TCPState in a string.
const std::string SYN_ACKED
static std::string state_summary(const TCPReceiver &receiver)
Summarize the state of a TCPReceiver in a string.
const std::string FIN_ACKED
@ SYN_SENT
Sent a SYN to initiate a connection.