42  log::Log_context(this_thread_init_logger_setup(
"", logger_ptr),
 
   49  m_opts(validate_options(opts, true, err_code)),
 
   50  m_net_env_sim(net_env_sim), 
 
   51  m_low_lvl_sock(m_task_engine), 
 
   52  m_packet_data(logger_ptr),
 
   54  m_seq_num_generator(logger_ptr),
 
   55  m_sock_events(
Event_set::empty_ev_type_to_socks_map()),
 
   57  m_event_loop_ready_result(m_event_loop_ready.get_future()),
 
   68  m_signal_set(m_task_engine),
 
   70  m_worker(&
Node::worker_run, this, low_lvl_endpoint)
 
   76  FLOW_LOG_INFO(
"Starting flow::Node [" << 
static_cast<void*
>(
this) << 
"].");
 
   79  if (err_code && (*err_code))
 
   86  err_code || (err_code = &our_err_code);
 
   91                "Waiting for it to report startup success or failure.");
 
   99                     "[" << *err_code << 
"] [" << err_code->message() << 
"].");
 
  103    FLOW_LOG_INFO(
"Flow worker thread [T" << 
m_worker.get_id() << 
"] reports to me it is ready for work.");
 
  128  if (!thread_type.empty())
 
  131    string thread_nickname; 
 
  133    Logger::this_thread_set_logged_nickname(thread_nickname, logger_ptr);
 
  148  FLOW_LOG_INFO(
"Node [" << 
static_cast<void*
>(
this) << 
"] shut down.");
 
  156  using boost::asio::socket_base;
 
  157  using boost::asio::post;
 
  166  FLOW_LOG_INFO(
"Flow worker thread reporting for duty.  Will bind to [UDP " << low_lvl_endpoint << 
"].");
 
  199  catch (
const system_error& exc)
 
  203    FLOW_LOG_WARNING(
"Unable to set up low-level socket.  Node cannot initialize.  Thread exiting.");
 
  238    FLOW_LOG_INFO(
"Setting up internal wait-interrupting interrupt signal handler.  " 
  239                  "CAUTION!  User program MUST avoid using non-boost::asio::signal_set signal handling!  " 
  240                  "If it does use non-boost.asio, behavior is undefined.");
 
  300    FLOW_LOG_TRACE(
"Flow worker thread event loop stopped.  Running queued up handlers.");
 
  305    FLOW_LOG_INFO(
"Worker thread told to stop (probably Node destructor executed).  " 
  306                    "Sending [RST] to all open Flow sockets.");
 
  310    for (
const auto& sock_pair : 
m_socks)
 
  321      Socket_id_to_socket_map::const_iterator sock_it = 
m_socks.begin();
 
  332      Port_to_server_map::const_iterator serv_it = 
m_servs.begin();
 
  338    FLOW_LOG_TRACE(
"Closing all event sets and waking up any on-going waits on those event sets.");
 
  361  catch (
const system_error& exc)
 
  429  using boost::static_pointer_cast;
 
  430  using boost::dynamic_pointer_cast;
 
  431  using boost::shared_ptr;
 
  432  using boost::asio::const_buffer;
 
  433  using std::type_index;
 
  438  const size_t packet_data_size = packet_data->size();
 
  496  const auto& packet_ref = *packet;
 
  519  const flow_port_t flow_local_port = packet->m_packed.m_dst_port;
 
  520  const flow_port_t flow_remote_port = packet->m_packed.m_src_port;
 
  536  assert((
typeid(packet_ref) != 
typeid(
Data_packet)) ||
 
  537         (!(static_pointer_cast<const Data_packet>(packet)->m_data.empty())));
 
  551  const Socket_id socket_id{ { low_lvl_remote_endpoint, flow_remote_port }, flow_local_port };
 
  552  Socket_id_to_socket_map::const_iterator sock_entry = 
m_socks.find(
socket_id);
 
  553  if (sock_entry != 
m_socks.end())
 
  560    sock->m_rcv_stats.low_lvl_packet(
typeid(packet_ref), packet_data_size);
 
  570      shared_ptr<Data_packet> data;
 
  571      shared_ptr<Ack_packet> ack;
 
  572      shared_ptr<Syn_packet> syn;
 
  573      shared_ptr<Syn_ack_packet> syn_ack;
 
  584      if ((data = dynamic_pointer_cast<Data_packet>(packet)))
 
  589          FLOW_LOG_WARNING(
"Packet of type [" << packet->m_type_ostream_manip << 
"] targeted at [" << sock << 
"] in " 
  590                           "state [" << state << 
"] has data size [" << data->m_data.size() << 
"] exceeding " 
  591                           "maximum block size [" << 
max_block_size << 
"].  Dropping packet.");
 
  595        data->m_seq_num.set_metadata(
'R', sock->m_rcv_init_seq_num + 1, 
max_block_size);
 
  597      else if ((ack = dynamic_pointer_cast<Ack_packet>(packet)))
 
  601          individual_ack->m_seq_num.set_metadata(
'L', sock->m_snd_init_seq_num + 1, 
max_block_size);
 
  604      else if ((syn = dynamic_pointer_cast<Syn_packet>(packet)))
 
  606        syn->m_init_seq_num.set_metadata(
'R', syn->m_init_seq_num + 1, 
max_block_size);
 
  608      else if ((syn_ack = dynamic_pointer_cast<Syn_ack_packet>(packet)))
 
  610        syn_ack->m_init_seq_num.set_metadata(
'R', syn_ack->m_init_seq_num + 1, 
max_block_size);
 
  616    bool reply_with_rst = 
false;
 
  637        reply_with_rst = 
true;
 
  643        reply_with_rst = 
true;
 
  645      else if (
typeid(packet_ref) == 
typeid(
Data_packet)) 
 
  649        reply_with_rst = 
true;
 
  651      else if (
typeid(packet_ref) == 
typeid(
Ack_packet)) 
 
  655        reply_with_rst = 
true;
 
  657      else if (
typeid(packet_ref) == 
typeid(
Rst_packet)) 
 
  669                                   static_pointer_cast<const Syn_ack_packet>(packet));
 
  695        if (static_pointer_cast<const Syn_packet>(packet)->m_init_seq_num == sock->m_rcv_init_seq_num)
 
  698          FLOW_LOG_TRACE(
"Duplicate valid [" << packet->m_type_ostream_manip << 
"] packet; ignoring.");
 
  703          reply_with_rst = 
true;
 
  710        reply_with_rst = 
true;
 
  713      else if (
typeid(packet_ref) == 
typeid(
Data_packet)) 
 
  722      else if (
typeid(packet_ref) == 
typeid(
Ack_packet)) 
 
  727        reply_with_rst = 
true;
 
  729      else if (
typeid(packet_ref) == 
typeid(
Rst_packet)) 
 
  770        if (static_pointer_cast<const Syn_packet>(packet)->m_init_seq_num == sock->m_rcv_init_seq_num)
 
  773          FLOW_LOG_TRACE(
"Duplicate valid [" << packet->m_type_ostream_manip << 
"] packet; ignoring.");
 
  778          reply_with_rst = 
true;
 
  795        auto syn_ack = static_pointer_cast<const Syn_ack_packet>(packet);
 
  797        if (sock->m_active_connect && (syn_ack->m_init_seq_num == sock->m_rcv_init_seq_num))
 
  804          reply_with_rst = 
true;
 
  817        if ((!sock->m_active_connect) &&
 
  818            (static_pointer_cast<const Syn_ack_ack_packet>(packet)->m_packed.m_security_token
 
  819               == sock->m_security_token))
 
  822          FLOW_LOG_TRACE(
"Duplicate valid [" << packet->m_type_ostream_manip << 
"] packet; ignoring.");
 
  827          reply_with_rst = 
true;
 
  830      else if (
typeid(packet_ref) == 
typeid(
Rst_packet)) 
 
  838      else if (
typeid(packet_ref) == 
typeid(
Data_packet)) 
 
  842                                   static_pointer_cast<Data_packet>(packet),
 
  845      else if (
typeid(packet_ref) == 
typeid(
Ack_packet)) 
 
  865        FLOW_LOG_WARNING(
"Packet of type [" << packet->m_type_ostream_manip << 
"] targeted at [" << sock << 
"] in " 
  866                         "state [" << state << 
"]; replying with RST.");
 
  871        FLOW_LOG_WARNING(
"Packet of type [" << packet->m_type_ostream_manip << 
"] targeted at [" << sock << 
"] in " 
  872                         "state [" << state << 
"]; dropping without reply.");
 
  891  Port_to_server_map::const_iterator serv_entry = 
m_servs.find(flow_local_port);
 
  892  if (serv_entry != 
m_servs.end())
 
  912                                                     static_pointer_cast<const Syn_packet>(packet),
 
  913                                                     low_lvl_remote_endpoint);
 
  921        new_sock->m_rcv_stats.low_lvl_packet(
typeid(packet_ref), packet_data_size);
 
  928      FLOW_LOG_WARNING(
"Packet of type [" << packet->m_type_ostream_manip << 
"] from " 
  929                       "[UDP " << low_lvl_remote_endpoint << 
"] targeted at state [" << state << 
"] " 
  930                       "server port [" << flow_local_port << 
"]; replying with RST.");
 
  935      FLOW_LOG_WARNING(
"Packet of type [" << packet->m_type_ostream_manip << 
"] from " 
  936                       "[UDP " << low_lvl_remote_endpoint << 
"] targeted at state [" << state << 
"] " 
  937                       "server port [" << flow_local_port << 
"]; dropping without reply.");
 
  954    FLOW_LOG_WARNING(
"Packet from [UDP " << low_lvl_remote_endpoint << 
"] specified state [NOT_A_SOCKET] " 
  955                     "port [" << flow_local_port << 
"]; meaning no such socket known; replying with RST.");
 
  960    FLOW_LOG_WARNING(
"Packet of type [" << packet->m_type_ostream_manip << 
"] from " 
  961                     "[UDP " << low_lvl_remote_endpoint << 
"] specified state [NOT_A_SOCKET] " 
  962                     "port [" << flow_local_port << 
"]; meaning no such socket known; dropping without reply.");
 
  972#define VALIDATE_STATIC_OPTION(ARG_opt) \ 
  973  validate_static_option(opts.ARG_opt, m_opts.ARG_opt, #ARG_opt, err_code) 
  974#define VALIDATE_CHECK(ARG_check) \ 
  975  validate_option_check(ARG_check, #ARG_check, err_code) 
 1016    const bool static_ok
 
 1017      = VALIDATE_STATIC_OPTION(m_st_capture_interrupt_signals_internally) &&
 
 1018        VALIDATE_STATIC_OPTION(m_st_low_lvl_max_buf_size) &&
 
 1019        VALIDATE_STATIC_OPTION(m_st_timer_min_period);
 
 1031  const bool checks_ok
 
 1050#undef VALIDATE_CHECK 
 1051#undef VALIDATE_STATIC_OPTION 
 1097    FLOW_LOG_WARNING(
"When changing options, check [" << check_str << 
"] is false.  " 
 1098                     "Ignoring entire option set.");
 
 1128  for (
const auto& id_and_sock : 
m_socks)
 
 1148  using boost::hash_combine;
 
An std::runtime_error (which is an std::exception) that stores an Error_code.
Logger * get_logger() const
Returns the stored Logger pointer, particularly as many FLOW_LOG_*() macros expect.
Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
A user-set collection of sockets and desired conditions on those sockets (such as: "socket has data t...
util::Lock_guard< Mutex > Lock_guard
Short-hand for RAII lock guard of Mutex. Use instead of boost::lock_guard for release() at least.
Objects of this class can be fed to Node to make it internally simulate network conditions like loss,...
An object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a di...
void handle_data_to_established(const Socket_id &socket_id, Peer_socket::Ptr sock, boost::shared_ptr< Data_packet > packet, bool syn_rcvd_qd_packet)
Handles a just-deserialized, just-demultiplexed, low-level DATA packet delivered to the given peer so...
void perform_accumulated_on_recv_tasks()
Performs all tasks to be performed at the end of low_lvl_recv_and_handle() or async part of async_wai...
void handle_accumulated_acks(const Socket_id &socket_id, Peer_socket::Ptr sock)
Helper of perform_accumulated_on_recv_tasks() that handles any incoming acknowledgments and rcv_wnd u...
Node_options options() const
Copies this Node's option set and returns that copy.
void handle_incoming(util::Blob *packet_data, const util::Udp_endpoint &low_lvl_remote_endpoint)
Handles a just-received, not-yet-deserialized low-level packet.
~Node() override
Destroys Node.
static const size_t & S_NUM_PORTS
Total number of Flow ports in the port space, including S_PORT_ANY.
size_t m_low_lvl_max_buf_size
OS-reported m_low_lvl_sock UDP receive buffer maximum size, obtained right after we OS-set that setti...
bool set_options(const Node_options &opts, Error_code *err_code=0)
Dynamically replaces the current options set (options()) with the given options set.
void sync_sock_low_lvl_rst_send(Peer_socket::Ptr sock)
Sends an RST to the other side of the given socket, synchronously.
void handle_syn_ack_ack_to_syn_rcvd(const Socket_id &socket_id, Peer_socket::Ptr sock, boost::shared_ptr< const Syn_ack_ack_packet > syn_ack_ack)
Handles a just-deserialized, just-demultiplexed low-level SYN_ACK_ACK packet delivered to the given p...
static const Fine_duration S_REGULAR_INFREQUENT_TASKS_PERIOD
Time interval between performing "infrequent periodic tasks," such as stat logging.
Opt_type opt(const Opt_type &opt_val_ref) const
Obtain a copy of the value of a given option in a thread-safe manner.
bool sock_validate_options(const Peer_socket_options &opts, const Peer_socket_options *prev_opts, Error_code *err_code) const
Analogous to validate_options() but checks per-socket options instead of per-Node options.
Options_mutex m_opts_mutex
The mutex protecting m_opts.
void handle_accumulated_pending_acks(const Socket_id &socket_id, Peer_socket::Ptr sock)
Helper of perform_accumulated_on_recv_tasks() that handles any additional individual outgoing acknowl...
size_t max_block_size() const
The maximum number of bytes of user data per received or sent block on connections generated from thi...
const util::Udp_endpoint & local_low_lvl_endpoint() const
Return the UDP endpoint (IP address and UDP port) which will be used for receiving incoming and sendi...
void worker_run(const util::Udp_endpoint low_lvl_endpoint)
Worker thread W (main event loop) body.
boost::unique_future< Error_code > m_event_loop_ready_result
The future object through which the non-W thread waits for m_event_loop_ready to be set to success/fa...
void event_set_close_worker(Event_set::Ptr event_set)
The guts of event_set_close_worker_check_state(): same thing, but assumes Event_set::state() == Event...
void async_no_sock_low_lvl_rst_send(Low_lvl_packet::Const_ptr causing_packet, const util::Udp_endpoint &low_lvl_remote_endpoint)
Sends an RST to the given UDP endpoint in response to the given incoming low-level packet that came f...
void sock_log_detail(Peer_socket::Const_ptr sock) const
Logs a verbose state report for the given socket.
static const size_t & S_NUM_EPHEMERAL_PORTS
Total number of Flow "ephemeral" ports (ones reserved locally at random with Node::listen(S_PORT_ANY)...
boost::unordered_set< Peer_socket::Ptr > m_socks_with_accumulated_pending_acks
Within a given low_lvl_recv_and_handle() or async part of async_wait_latency_then_handle_incoming() (...
boost::unordered_set< Peer_socket::Ptr > m_socks_with_accumulated_acks
Within a given low_lvl_recv_and_handle() or async part of async_wait_latency_then_handle_incoming() c...
friend size_t hash_value(const Socket_id &socket_id)
util::Thread m_worker
Worker thread (= thread W). Other members should be initialized before this to avoid race condition.
void event_set_all_check_delta(bool defer_delta_check)
For each WAITING Event_set within the Node: checks for any events that hold, and if any do hold,...
Socket_id_to_socket_map m_socks
The peer-to-peer connections this Node is currently tracking.
bool validate_option_check(bool check, const std::string &check_str, Error_code *err_code) const
Helper that, if the given condition is false, logs and returns an error; used to check for option val...
static const flow_port_t & S_FIRST_SERVICE_PORT
The port number of the lowest service port, making the range of service ports [S_FIRST_SERVICE_PORT,...
Peer_socket::Options_lock Options_lock
Short-hand for lock that acquires exclusive access to an Options_mutex.
friend bool operator==(const Socket_id &lhs, const Socket_id &rhs)
static Socket_id socket_id(Peer_socket::Const_ptr sock)
Constructs the socket pair (connection ID) for the given socket.
Udp_socket m_low_lvl_sock
The UDP socket used to receive low-level packets (to assemble into application layer data) and send t...
void handle_syn_ack_to_syn_sent(const Socket_id &socket_id, Peer_socket::Ptr sock, boost::shared_ptr< const Syn_ack_packet > syn_ack)
Handles a just-deserialized, just-demultiplexed low-level SYN_ACK packet delivered to the given peer ...
static const size_t & S_NUM_SERVICE_PORTS
Total number of Flow "service" ports (ones that can be reserved by number with Node::listen()).
static const flow_port_t & S_FIRST_EPHEMERAL_PORT
The port number of the lowest ephemeral Flow port, making the range of ephemeral ports [S_FIRST_EPHEM...
boost::promise< Error_code > m_event_loop_ready
Promise that thread W sets to truthy Error_code if it fails to initialize or falsy once event loop is...
log::Logger * this_thread_init_logger_setup(const std::string &thread_type, log::Logger *logger=0)
Helper to invoke for each thread in which this Node executes, whether or not it starts that thread,...
Peer_socket::Ptr handle_syn_to_listening_server(Server_socket::Ptr serv, boost::shared_ptr< const Syn_packet > syn, const util::Udp_endpoint &low_lvl_remote_endpoint)
Handles a just-deserialized, just-demultiplexed low-level SYN packet delivered to the given server so...
bool running() const
Returns true if and only if the Node is operating.
Port_to_server_map m_servs
The server sockets this Node is currently tracking.
const Node_options & validate_options(const Node_options &opts, bool init, Error_code *err_code) const
Given a new set of Node_options intended to replace (or initialize) a Node's m_opts,...
void handle_ack_to_established(Peer_socket::Ptr sock, boost::shared_ptr< const Ack_packet > ack)
Handles a just-deserialized, just-demultiplexed, low-level ACK packet delivered to the given peer soc...
void handle_syn_ack_to_established(Peer_socket::Ptr sock, boost::shared_ptr< const Syn_ack_packet > syn_ack)
Handles a just-deserialized, just-demultiplexed, duplicate (equal to already-received SYN_ACK) low-le...
Signal_set m_signal_set
Signal set which we may or may not be using to trap SIGINT and SIGTERM in order to auto-fire interrup...
void handle_data_to_syn_rcvd(Peer_socket::Ptr sock, boost::shared_ptr< Data_packet > packet)
Handles a just-deserialized, just-demultiplexed, low-level DATA packet delivered to the given peer so...
Node(log::Logger *logger, const util::Udp_endpoint &low_lvl_endpoint, Net_env_simulator *net_env_sim=0, Error_code *err_code=0, const Node_options &opts=Node_options())
Constructs Node.
void async_sock_low_lvl_rst_send(Peer_socket::Ptr sock)
Sends an RST to the other side of the given socket asynchronously when possible.
Node_options m_opts
This Node's global set of options.
void async_low_lvl_recv()
Registers so that during the current or next m_task_engine.run(), the latter will wait for a receivab...
void close_connection_immediately(const Socket_id &socket_id, Peer_socket::Ptr sock, const Error_code &err_code, bool defer_delta_check)
A thread W method that handles the transition of the given socket from OPEN (any sub-state) to CLOSED...
void close_empty_server_immediately(const flow_port_t local_port, Server_socket::Ptr serv, const Error_code &err_code, bool defer_delta_check)
Handles the transition of the given server socket from S_LISTENING/S_CLOSING to S_CLOSED (including e...
Event_sets m_event_sets
Every Event_set to have been returned by event_set_create() and not subsequently reached Event_set::S...
void interrupt_all_waits_internal_sig_handler(const Error_code &sys_err_code, int sig_number)
signal_set handler, executed on SIGINT and SIGTERM, if user has enabled this feature: causes interrup...
void perform_regular_infrequent_tasks(bool reschedule)
Performs low-priority tasks that should be run on an infrequent, regular basis, such as stat logging ...
util::Udp_endpoint m_low_lvl_endpoint
After we bind m_low_lvl_sock to a UDP endpoint, this is a copy of that endpoint.
util::Task_engine m_task_engine
The main loop engine, functioning in the single-threaded-but-asynchronous callback-based "reactor" st...
Int_state
The state of the socket (and the connection from this end's point of view) for the internal state mac...
@ S_ESTABLISHED
Public state is OPEN+CONNECTED; in our opinion the connection is established.
@ S_SYN_SENT
Public state is OPEN+CONNECTING; user requested active connect; we sent SYN and are awaiting response...
@ S_CLOSED
Closed (dead or new) socket.
@ S_SYN_RCVD
Public state is OPEN+CONNECTING; other side requested passive connect via SYN; we sent SYN_ACK and ar...
static const size_t S_NUM_EPHEMERAL_PORTS
Total number of "ephemeral" ports (ones reserved at random with reserve_ephemeral_port()).
static const flow_port_t S_FIRST_SERVICE_PORT
The port number of the lowest service port.
static const flow_port_t S_FIRST_EPHEMERAL_PORT
The port number of the lowest ephemeral port.
static const size_t S_NUM_SERVICE_PORTS
Total number of "service" ports (ones that can be reserved by number with reserve_port()).
static const size_t S_NUM_PORTS
Total number of ports in the port space, including S_PORT_ANY.
State
State of a Server_socket.
@ S_LISTENING
Future or current accept()s may be possible. A socket in this state may be Acceptable.
boost::shared_ptr< Event_set > Ptr
Short-hand for ref-counted pointer to mutable values of type Target_type::element_type (a-la T*).
#define FLOW_ERROR_SYS_ERROR_LOG_WARNING()
Logs a warning about the (often errno-based or from a library) error code in sys_err_code.
#define FLOW_ERROR_EXEC_AND_THROW_ON_ERROR(ARG_ret_type, ARG_function_name,...)
Narrow-use macro that implements the error code/exception semantics expected of most public-facing Fl...
#define FLOW_ERROR_EMIT_ERROR(ARG_val)
Sets *err_code to ARG_val and logs a warning about the error using FLOW_LOG_WARNING().
#define FLOW_LOG_INFO(ARG_stream_fragment)
Logs an INFO message into flow::log::Logger *get_logger() with flow::log::Component get_log_component...
#define FLOW_LOG_WARNING(ARG_stream_fragment)
Logs a WARNING message into flow::log::Logger *get_logger() with flow::log::Component get_log_compone...
#define FLOW_LOG_TRACE(ARG_stream_fragment)
Logs a TRACE message into flow::log::Logger *get_logger() with flow::log::Component get_log_component...
void beautify_chrono_logger_this_thread(Logger *logger_ptr)
Sets certain chrono-related formatting on the given Logger in the current thread that results in a co...
@ S_CONN_RESET_BY_OTHER_SIDE
Other side reset an established connection.
@ S_NODE_SHUTTING_DOWN
Node shutting down.
@ S_OPTION_CHECK_FAILED
When setting options, at least one option's value violates a required condition on that option.
@ S_CONN_REFUSED
Other side refused connection.
@ S_CONN_RESET_BAD_PEER_BEHAVIOR
Connection reset because of unexpected/illegal behavior by the other side.
@ S_NODE_NOT_RUNNING
Node not running.
Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
uint16_t flow_port_t
Logical Flow port type (analogous to a UDP/TCP port in spirit but in no way relevant to UDP/TCP).
const flow_port_t S_PORT_ANY
Special Flow port value used to indicate "invalid port" or "please pick a random available ephemeral ...
Scheduled_task_handle schedule_task_from_now(log::Logger *logger_ptr, const Fine_duration &from_now, bool single_threaded, Task_engine *task_engine, Scheduled_task_handler &&task_body_moved)
Schedule the given function to execute in a certain amount of time: A handy wrapper around Timer (asi...
void ostream_op_to_string(std::string *target_str, T const &... ostream_args)
Writes to the specified string, as if the given arguments were each passed, via << in sequence,...
Blob_with_log_context<> Blob
A concrete Blob_with_log_context that compile-time-disables Basic_blob::share() and the sharing API d...
boost::asio::ip::udp::endpoint Udp_endpoint
Short-hand for the UDP endpoint (IP/port) type.
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
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.
boost::shared_ptr< Individual_ack > Ptr
Short-hand for ref-counted pointer to mutable objects of this class.
Internal net_flow struct that encapsulates the Flow-protocol low-level ACK packet.
Internal net_flow struct that encapsulates the Flow-protocol low-level DATA packet.
static Ptr create_from_raw_data_packet(log::Logger *logger_ptr, util::Blob *raw_packet, bool prefer_no_move)
Constructs packet on the heap with values determined by the given raw binary data as presumably recei...
The data nugget uniquely identifying a peer-to-peer connection from a remote endpoint to a port in th...
const Remote_endpoint m_remote_endpoint
The other side of the connection.
size_t hash() const
Hash value of this Socket_id for unordered<>.
const flow_port_t m_local_port
This side of the connection (within this Node).
A set of low-level options affecting a single Flow Node, including Peer_socket objects and other obje...
Peer_socket_options m_dyn_sock_opts
The set of per-Peer_socket options in this per-Node set of options.
size_t m_st_low_lvl_max_buf_size
The max size to ask the OS to set our UDP socket's receive buffer to in order to minimize loss if we ...
size_t m_dyn_low_lvl_max_packet_size
Any incoming low-level (UDP) packet will be truncated to this size.
Fine_duration m_st_timer_min_period
A time period such that the boost.asio timer implementation for this platform is able to accurately a...
bool m_dyn_guarantee_one_low_lvl_in_buf_per_socket
This very inside-baseball setting controls the allocation/copy behavior of the UDP receive-deserializ...
bool m_st_capture_interrupt_signals_internally
If and only if this is true, the Node will detect SIGINT and SIGTERM (or your OS's version thereof); ...
size_t m_st_max_block_size
The size of block that we will strive to (and will, assuming at least that many bytes are available i...
Internal net_flow struct that encapsulates the Flow-protocol low-level RST packet.
Internal net_flow struct that encapsulates the Flow-protocol low-level SYN_ACK_ACK packet.
Internal net_flow struct that encapsulates the Flow-protocol low-level SYN_ACK packet.
Internal net_flow struct that encapsulates the Flow-protocol low-level SYN packet.
#define FLOW_UTIL_WHERE_AM_I_STR()
Same as FLOW_UTIL_WHERE_AM_I() but evaluates to an std::string.