Boost C++ Libraries: Ticket #13462: set_option: The requested address is not valid in its context https://svn.boost.org/trac10/ticket/13462 <p> I follow this code to create a UDP multicast receiver: <a href="http://www.boost.org/doc/libs/1_66_0/doc/html/boost_asio/example/cpp11/multicast/receiver.cpp">http://www.boost.org/doc/libs/1_66_0/doc/html/boost_asio/example/cpp11/multicast/receiver.cpp</a> </p> <p> I modify the code with these for predefined values: </p> <p> class receiver: </p> <blockquote> <p> short multicast_port = 13; </p> </blockquote> <p> in main(): </p> <blockquote> <p> <em>if (argc != 3) and the code for argv that follows are commented out </em></p> </blockquote> <blockquote> <p> receiver r(io_context, boost::asio::ip::make_address("127.0.0.1"), boost::asio::ip::make_address("127.0.0.1")); </p> </blockquote> <p> This error is thrown: </p> <blockquote> <p> set_option: The requested address is not valid in its context </p> </blockquote> <p> 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? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13462 Trac 1.4.3 nguyen.tnhoang@… Sat, 03 Mar 2018 22:09:17 GMT attachment set https://svn.boost.org/trac10/ticket/13462 https://svn.boost.org/trac10/ticket/13462 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">UdpMulticastSender_1_66.cpp</span> </li> </ul> <p> udp sender used to send sample messages to be listened to </p> Ticket