JayBeams
0.1
Another project to have fun coding.
|
A configuration object for UDP receivers. More...
#include <udp_receiver_config.hpp>
Public Member Functions | |
udp_receiver_config () | |
config_object_constructors (udp_receiver_config) | |
void | validate () const override |
Validate the settings. More... | |
![]() | |
udp_config_common () | |
config_object_constructors (udp_config_common) | |
![]() | |
config_object () | |
Default constructor. More... | |
config_object (config_object const &rhs) | |
Copy constructor. More... | |
config_object (config_object &&rhs) | |
Move constructor. More... | |
virtual | ~config_object () |
Destructor. More... | |
config_object & | operator= (config_object rhs) |
Copy & swap assignment. More... | |
void | swap (config_object &rhs) |
Derived classes should implement member by member swap. More... | |
void | load_overrides (int &argc, char *argv[], std::string const &filename, char const *environment_variable_name) |
Read the configuration file and load the overrides defined therein. More... | |
void | load_overrides (int &argc, char *argv[], std::string const &filename) |
Read the configuration file and load the overrides defined therein. More... | |
void | load_overrides (int &argc, char *argv[], std::istream &is) |
Read the configuration file and load the overrides defined therein. More... | |
void | process_cmdline (int &argc, char *argv[]) |
Process the command line. More... | |
std::ostream & | to_stream (std::ostream &os) const |
Print out the settings. More... | |
Public Attributes | |
jb::config_attribute< udp_receiver_config, std::string > | address |
jb::config_attribute< udp_receiver_config, int > | port |
jb::config_attribute< udp_receiver_config, std::string > | local_address |
![]() | |
jb::config_attribute< udp_config_common, bool > | debug |
jb::config_attribute< udp_config_common, bool > | do_not_route |
jb::config_attribute< udp_config_common, bool > | linger |
jb::config_attribute< udp_config_common, int > | linger_seconds |
jb::config_attribute< udp_config_common, bool > | reuse_address |
jb::config_attribute< udp_config_common, int > | receive_buffer_size |
jb::config_attribute< udp_config_common, int > | receive_low_watermark |
jb::config_attribute< udp_config_common, int > | send_buffer_size |
jb::config_attribute< udp_config_common, int > | send_low_watermark |
Additional Inherited Members | |
![]() | |
static attribute_descriptor | desc (std::string const &name) |
Convenience function to create attribute descriptors with less typing. More... | |
static attribute_descriptor | desc (std::string const &name, std::string const &class_name) |
Convenience function to create attribute descriptors with less typing. More... | |
A configuration object for UDP receivers.
The receive_address attribute the destination address for the messages that we want to receive. For unicast messages that must be one of the addresses of the host. For multicast messages that is simply the multicast group to receive, in this case, listen_address the local address for the socket. If listen_address is the empty string, the local address is guessed based on the value of receive_address: (a) for IPv4 multicast groups simply use 0.0.0.0, (b) for IPv6 multicast groups simply use ::1. It is an error to configure receive_address as a unicast address and also set listen_address.
Definition at line 23 of file udp_receiver_config.hpp.
jb::itch5::udp_receiver_config::udp_receiver_config | ( | ) |
Definition at line 10 of file udp_receiver_config.cpp.
jb::itch5::udp_receiver_config::config_object_constructors | ( | udp_receiver_config | ) |
|
overridevirtual |
Validate the settings.
jb::usage | if a problem is detected. |
Reimplemented from jb::config_object.
Definition at line 36 of file udp_receiver_config.cpp.
References address, local_address, port, and jb::config_object::validate().
jb::config_attribute<udp_receiver_config, std::string> jb::itch5::udp_receiver_config::address |
Definition at line 30 of file udp_receiver_config.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), jb::itch5::detail::setup_socket_udp_recv(), and validate().
jb::config_attribute<udp_receiver_config, std::string> jb::itch5::udp_receiver_config::local_address |
Definition at line 32 of file udp_receiver_config.hpp.
Referenced by jb::itch5::detail::setup_socket_udp_recv(), and validate().
jb::config_attribute<udp_receiver_config, int> jb::itch5::udp_receiver_config::port |
Definition at line 31 of file udp_receiver_config.hpp.
Referenced by jb::itch5::detail::setup_socket_udp_recv(), and validate().