|
Sponge
CS144's user-space TCP library
|
Go to the documentation of this file.
12 template <
typename... Targs>
22 , _initial_retransmission_timeout{retx_timeout}
23 , _stream(capacity) {}
unsigned int consecutive_retransmissions() const
Number of consecutive retransmissions that have occurred in a row.
A 32-bit integer, expressed relative to an arbitrary initial sequence number (ISN)
void send_empty_segment()
Generate an empty-payload segment (useful for creating empty ACK segments)
size_t bytes_in_flight() const
How many sequence numbers are occupied by segments sent but not yet acknowledged?
void DUMMY_CODE(Targs &&...)
TCPSender(const size_t capacity=TCPConfig::DEFAULT_CAPACITY, const uint16_t retx_timeout=TCPConfig::TIMEOUT_DFLT, const std::optional< WrappingInt32 > fixed_isn={})
Initialize a TCPSender.
void ack_received(const WrappingInt32 ackno, const uint16_t window_size)
A new acknowledgment was received.
void tick(const size_t ms_since_last_tick)
Notifies the TCPSender of the passage of time.
void fill_window()
create and send segments to fill as much of the window as possible