Add interface_address parameter to UDPConnection.addMembership.

This commit is contained in:
Sönke Ludwig 2017-09-15 15:54:59 +02:00
parent 6cf2579206
commit 333643d48e
2 changed files with 3 additions and 3 deletions

View file

@ -4,7 +4,7 @@ authors "Sönke Ludwig"
copyright "Copyright © 2016, rejectedsoftware e.K."
license "MIT"
dependency "eventcore" version="~>0.8.16"
dependency "eventcore" version="~>0.8.18"
targetName "vibe_core"

View file

@ -800,10 +800,10 @@ struct UDPConnection {
See https://www.iana.org/assignments/multicast-addresses/multicast-addresses.xml#multicast-addresses-12
and https://www.iana.org/assignments/ipv6-multicast-addresses/ipv6-multicast-addresses.xhtml
*/
void addMembership(ref NetworkAddress multiaddr)
void addMembership(ref NetworkAddress multiaddr, uint interface_address = 0)
{
scope addr = new RefAddress(multiaddr.sockAddr, multiaddr.sockAddrMaxLen);
enforce(eventDriver.sockets.joinMulticastGroup(m_socket, addr),
enforce(eventDriver.sockets.joinMulticastGroup(m_socket, addr, interface_address),
"Failed to add multicast membership.");
}