80const std::map<std::string, Congestion_control_selector::Strategy_choice>
84 Strategy_choice::S_CLASSIC },
85 {
"classic_with_bandwidth_est",
86 Strategy_choice::S_CLASSIC_BANDWIDTH_ESTIMATED }
89const std::map<Congestion_control_selector::Strategy_choice, std::string>
92 { Strategy_choice::S_CLASSIC,
94 { Strategy_choice::S_CLASSIC_BANDWIDTH_ESTIMATED,
95 "classic_with_bandwidth_est" }
104 switch (strategy_choice)
120 ids->push_back(id_and_strategy.first);
154 return os << it->second;
Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
Classic congestion control but with backoff to bandwidth estimate-based pipe size.
Classic congestion control, based on Reno (TCP RFC 5681), with congestion avoidance,...
static Congestion_control_strategy * create_strategy(Strategy_choice strategy_choice, log::Logger *logger_ptr, Peer_socket::Const_ptr sock)
Factory method that, given an enum identifying the desired strategy, allocates the appropriate Conges...
static const std::map< Strategy_choice, std::string > S_STRATEGY_TO_ID_MAP
The inverse of S_ID_TO_STRATEGY_MAP.
static const std::map< std::string, Strategy_choice > S_ID_TO_STRATEGY_MAP
Maps each ID to the corresponding Strategy_choice enum value.
static void get_ids(std::vector< std::string > *ids)
Returns a list of strings, called IDs, each of which textually represents a distinct Congestion_contr...
The abstract interface for a per-socket module that determines the socket's congestion control behavi...
Congestion_control_strategy(log::Logger *logger_ptr, Peer_socket::Const_ptr sock)
Constructs object by setting up logging and saving a pointer to the containing Peer_socket.
boost::weak_ptr< Peer_socket::Const_ptr::element_type > m_sock
The containing socket (read-only access).
virtual void on_loss_event(size_t bytes, size_t packets)
Informs the congestion control strategy that 1 or more previously sent packets whose status was In-fl...
Peer_socket::Const_ptr socket() const
Utility for subclasses that returns a handle to the containing Peer_socket.
virtual void on_idle_timeout()
Informs the congestion control strategy that Node considers the connection to be "idle" by virtue of ...
virtual void on_acks(size_t bytes, size_t packets)
Informs the congestion control strategy that 1 or more previously sent packets whose status was In-fl...
virtual void on_individual_ack(const Fine_duration &packet_rtt, const size_t bytes, const size_t sent_cwnd_bytes)
Informs the congestion control strategy that exactly 1 previously sent packet whose status was In-fli...
virtual void on_drop_timeout(size_t bytes, size_t packets)
Informs the congestion control strategy that 1 or more previously sent packets whose status was In-fl...
Const_target_ptr Const_ptr
Short-hand for ref-counted pointer to immutable values of type Target_type::element_type (a-la T cons...
Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
std::istream & operator>>(std::istream &is, Congestion_control_selector::Strategy_choice &strategy_choice)
Deserializes a Peer_socket_options::Congestion_control_strategy_choice enum from a standard input str...
std::ostream & operator<<(std::ostream &os, const Congestion_control_selector::Strategy_choice &strategy_choice)
Serializes a Peer_socket_options::Congestion_control_strategy_choice enum to a standard ostream – the...
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Congestion_control_strategy_choice
The possible choices for congestion control strategy for the socket.
@ S_CLASSIC
Classic (Reno-style) AIMD congestion control.
@ S_CLASSIC_BANDWIDTH_ESTIMATED
Classic congestion control but with loss resulting in a window chosen from an outgoing bandwidth esti...