4 #include <boost/asio/ip/udp.hpp> 13 "The destination address of the packets to receive." 14 " When receiving unicast messages this must be one of the " 15 "addresses of the host, and local_address must be empty." 16 " When receiving multicast messages this is the multicast " 17 "group of the messages to receive."),
20 desc(
"port").help(
"The UDP port of the packets to receive."), this, 0)
23 .help(
"The local address of the receive socket." 24 " If the value of --address is a unicast address this " 26 " If the value of --address is a multicast address this " 27 "can be one of the local addresses of the host, in which " 28 "cast that binds the socket to a specific interface to " 29 "receive the multicast messages." 30 " If the value of --address is a multicast address, and " 31 "this option is empty, the the system picks the right " 32 "ADDRANY to receive the messages."),
41 auto a = boost::asio::ip::address::from_string(
address());
43 std::ostringstream os;
44 os <<
"Invalid configuration for udp_receiver. --address (" <<
address()
45 <<
") is a unicast address, and --local-address is not "
virtual void validate() const
Validate the settings.
jb::config_attribute< udp_receiver_config, std::string > address
jb::config_attribute< udp_receiver_config, std::string > local_address
jb::config_attribute< udp_receiver_config, int > port
A simple class to communicate the result of parsing the options.
void validate() const override
Validate the settings.
The top-level namespace for the JayBeams library.