Opened 5 years ago
#13462 new Bugs
set_option: The requested address is not valid in its context
Reported by: | Owned by: | chris_kohlhoff | |
---|---|---|---|
Milestone: | Component: | asio | |
Version: | Boost 1.66.0 | Severity: | Showstopper |
Keywords: | asio udp multicast receiver | Cc: |
Description
I follow this code to create a UDP multicast receiver: http://www.boost.org/doc/libs/1_66_0/doc/html/boost_asio/example/cpp11/multicast/receiver.cpp
I modify the code with these for predefined values:
class receiver:
short multicast_port = 13;
in main():
if (argc != 3) and the code for argv that follows are commented out
receiver r(io_context, boost::asio::ip::make_address("127.0.0.1"), boost::asio::ip::make_address("127.0.0.1"));
This error is thrown:
set_option: The requested address is not valid in its context
I have tried "0.0.0.0" and "127.0.0.1" and other values. Still get the same error. Could someone please help me figuring out what went wrong?
udp sender used to send sample messages to be listened to