Sponge
CS144's user-space TCP library
Public Attributes | Static Public Attributes | List of all members
TCPConfig Class Reference

Config for TCP sender and receiver. More...

#include <tcp_config.hh>

Public Attributes

std::optional< WrappingInt32fixed_isn {}
 
size_t recv_capacity = DEFAULT_CAPACITY
 Receive capacity, in bytes. More...
 
uint16_t rt_timeout = TIMEOUT_DFLT
 Initial value of the retransmission timeout, in milliseconds. More...
 
size_t send_capacity = DEFAULT_CAPACITY
 Sender capacity, in bytes. More...
 

Static Public Attributes

static constexpr size_t DEFAULT_CAPACITY = 64000
 Default capacity. More...
 
static constexpr size_t MAX_PAYLOAD_SIZE = 1452
 Max TCP payload that fits in either IPv4 or UDP datagram. More...
 
static constexpr unsigned MAX_RETX_ATTEMPTS = 8
 Maximum re-transmit attempts before giving up. More...
 
static constexpr uint16_t TIMEOUT_DFLT = 1000
 Default re-transmit timeout is 1 second. More...
 

Detailed Description

Config for TCP sender and receiver.

Definition at line 12 of file tcp_config.hh.

Member Data Documentation

◆ DEFAULT_CAPACITY

constexpr size_t TCPConfig::DEFAULT_CAPACITY = 64000
staticconstexpr

Default capacity.

Definition at line 14 of file tcp_config.hh.

◆ fixed_isn

std::optional<WrappingInt32> TCPConfig::fixed_isn {}

Definition at line 22 of file tcp_config.hh.

◆ MAX_PAYLOAD_SIZE

constexpr size_t TCPConfig::MAX_PAYLOAD_SIZE = 1452
staticconstexpr

Max TCP payload that fits in either IPv4 or UDP datagram.

Definition at line 15 of file tcp_config.hh.

◆ MAX_RETX_ATTEMPTS

constexpr unsigned TCPConfig::MAX_RETX_ATTEMPTS = 8
staticconstexpr

Maximum re-transmit attempts before giving up.

Definition at line 17 of file tcp_config.hh.

◆ recv_capacity

size_t TCPConfig::recv_capacity = DEFAULT_CAPACITY

Receive capacity, in bytes.

Definition at line 20 of file tcp_config.hh.

◆ rt_timeout

uint16_t TCPConfig::rt_timeout = TIMEOUT_DFLT

Initial value of the retransmission timeout, in milliseconds.

Definition at line 19 of file tcp_config.hh.

◆ send_capacity

size_t TCPConfig::send_capacity = DEFAULT_CAPACITY

Sender capacity, in bytes.

Definition at line 21 of file tcp_config.hh.

◆ TIMEOUT_DFLT

constexpr uint16_t TCPConfig::TIMEOUT_DFLT = 1000
staticconstexpr

Default re-transmit timeout is 1 second.

Definition at line 16 of file tcp_config.hh.


The documentation for this class was generated from the following file: