Opened 5 years ago

#13462 new Bugs

set_option: The requested address is not valid in its context

Reported by: nguyen.tnhoang@… 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?

Attachments (1)

UdpMulticastSender_1_66.cpp (1.6 KB ) - added by nguyen.tnhoang@… 5 years ago.
udp sender used to send sample messages to be listened to

Download all attachments as: .zip

Change History (1)

by nguyen.tnhoang@…, 5 years ago

Attachment: UdpMulticastSender_1_66.cpp added

udp sender used to send sample messages to be listened to

Note: See TracTickets for help on using tickets.