mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-27 07:31:03 +08:00
parent
d8f3b283f8
commit
e0ec6a9b36
@ -206,8 +206,8 @@ void zmq::udp_engine_t::plug (io_thread_t *io_thread_, session_base_t *session_)
|
||||
bool multicast = udp_addr->is_mcast ();
|
||||
|
||||
if (multicast) {
|
||||
// Multicast addresses should be allowed to bind to more than
|
||||
// one port as all ports should receive the message
|
||||
// Multicast addresses should be allowed to bind to more than
|
||||
// one port as all ports should receive the message
|
||||
#ifdef SO_REUSEPORT
|
||||
rc = setsockopt (_fd, SOL_SOCKET, SO_REUSEPORT,
|
||||
reinterpret_cast<char *> (&on), sizeof (on));
|
||||
@ -221,6 +221,7 @@ void zmq::udp_engine_t::plug (io_thread_t *io_thread_, session_base_t *session_)
|
||||
// In multicast we should bind ANY and use the mreq struct to
|
||||
// specify the interface
|
||||
any.set_port (bind_addr->port ());
|
||||
|
||||
real_bind_addr = &any;
|
||||
} else {
|
||||
real_bind_addr = bind_addr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user