We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What steps will reproduce the problem? 1. Try to bind UdpListeningReceiveSocket to a multicast address and send messages to the multicast group. It won't work. Suggested fix: change the Bind method in UdpSocket.cpp to: void Bind( const IpEndpointName& localEndpoint ) { struct sockaddr_in bindSockAddr; SockaddrFromIpEndpointName( bindSockAddr, localEndpoint ); if (localEndpoint.IsMulticastAddress()) { group.imr_interface.s_addr = htonl(INADDR_ANY); group.imr_multiaddr.s_addr = bindSockAddr.sin_addr.s_addr; if (setsockopt(socket_, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *)&group, sizeof(group)) < 0) { throw std::runtime_error("error adding multicast group\n"); close(socket_); exit(1); } } if (bind(socket_, (struct sockaddr *)&bindSockAddr, sizeof(bindSockAddr)) < 0) { throw std::runtime_error("unable to bind udp socket\n"); } isBound_ = true; }
Original issue reported on code.google.com by [email protected] on 30 May 2014 at 4:39
[email protected]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Original issue reported on code.google.com by
[email protected]
on 30 May 2014 at 4:39The text was updated successfully, but these errors were encountered: