-
November 26th, 2013, 11:15 AM
#1
Multicast/unicast
We are connected to a server that sends udp multicast packets. Whenever a gap is detected we are supposed to send a "PacketRequest" to the server to get the missing packets. The server then sends the missing packets back to us with unicast to the same socket that we get the multicast packets on.
The problem we have is that, if we have several applications on the same machine connected to the same multicast group and port, they will get the same source address. This means that the unicast data that the server is sending back to us, is sent to one of the applications, but it might not be the one that requested the data. Do anyone know how we should set up our socket in order for this to work?
code looks like this:
Code:
boost::asio::ip::udp::endpoint endpoint(interface, port);
m_socket.open(endpoint.protocol());
m_socket.set_option(boost::asio::ip::udp::socket::reuse_address(true));
m_socket.bind(endpoint);
m_socket.set_option(boost::asio::ip::multicast::join_group(host));
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|