I’ve implemented a set of successfully functioning multicast readers but periodically and randomly during the day one or more of them loses a block of 2 minutes of data. My working theory is that either the router’s periodic request for report is getting lost or the host report is getting lost. So I would like to preemptively send a report to the router on a some interval. So the question is how would I do that? I don’t see a rejoin method in boost:asio for multicast. Any ideas would be greatly appreciated.
// code snippet from the constructor method
//
boost::asio::ip::udp::endpoint listen_endpoint(listen_address, mcPort);
socket_.open(listen_endpoint.protocol());
socket_.set_option(boost::asio::ip::udp::socket::reuse_address(true));
socket_.bind(listen_endpoint);
boost::asio::socket_base::receive_buffer_size option(65536*16);
socket_.set_option(option);
//
// Join the multicast group.
//
socket_.set_option(boost::asio::ip::multicast::join_group(multicast_address));
m_TimerRejoinGroup.expires_from_now(boost::posix_time::seconds(10));
m_TimerRejoinGroup.async_wait(boost::bind(&Feed::handleRejoin, this));
In answer to your direct question, there is no rejoin option, but you can leave and join again