14 #ifndef JB_ITCH5_DEFAULTS_maximum_delay_microseconds 15 #define JB_ITCH5_DEFAULTS_maximum_delay_microseconds 100 16 #endif // JB_ITCH5_DEFAULTS_maximum_delay_microseconds 40 #ifndef JB_ITCH5_DEFAULTS_maximum_transmission_unit 41 #define JB_ITCH5_DEFAULTS_maximum_transmission_unit 508 42 #endif // JB_ITCH5_DEFAULTS_maximum_transmission_unit 51 desc(
"maximum-delay-microseconds")
52 .help(
"Maximum time a MoldUDP packet is " 53 "delayed before sending it."),
56 desc(
"maximum-transmission-unit")
58 "Maximum MoldUDP message to be sent in a single UDP message. " 59 "The default value is extremely conservative. " 60 "If your Ethernet network is configured for an MTU of 1500, " 61 "use 1432 for this value. Beware of VLANs and other details " 62 "that may consume your available bytes."),
72 int const max_udp_payload = (1 << 16) - 1;
76 std::ostringstream os;
77 os <<
"--maximum-transimission-unit must be in the [" 85 using namespace std::chrono;
86 auto const day_in_usecs = duration_cast<microseconds>(minutes(5));
89 std::ostringstream os;
90 os <<
"--maximum-delay-microseconds must be in the [0," 91 << day_in_usecs.count()
jb::config_attribute< mold_udp_pacer_config, int > maximum_delay_microseconds
int maximum_delay_microseconds
Define defaults for program parameters.
#define JB_ITCH5_DEFAULTS_maximum_transmission_unit
void validate() const override
Validate the settings.
int maximum_transmission_unit
A simple class to communicate the result of parsing the options.
#define JB_ITCH5_DEFAULTS_maximum_delay_microseconds
constexpr std::size_t header_size
The total size of the MoldUDP64 header.
jb::config_attribute< mold_udp_pacer_config, int > maximum_transmission_unit
The top-level namespace for the JayBeams library.