Friday, December 30, 2011

Boost Aiso Multicast

Just tried the example, it did not work. Following is the working version.

  
udp::endpoint listen_endpoint(udp::v4(), port);
socket_.open(listen_endpoint.protocol());
socket_.set_option(socket_base::reuse_address(true));
socket_.bind(listen_endpoint);
socket_.set_option(multicast::join_group(address::from_string(group).to_v4(),
        address::from_string(interface).to_v4()));

No comments:

Post a Comment