From 2d0576a5fe961f6398d5bfe53fd216d4f872ae7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Sun, 3 Sep 2017 16:47:37 +0200 Subject: [PATCH 1/2] Implement the UDP multicast support methods. --- source/vibe/core/net.d | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/vibe/core/net.d b/source/vibe/core/net.d index 58f892d..48b7431 100644 --- a/source/vibe/core/net.d +++ b/source/vibe/core/net.d @@ -790,7 +790,8 @@ struct UDPConnection { */ @property void multicastLoopback(bool loop) { - assert(false, "not implemented."); + enforce(eventDriver.sockets.setOption(m_socket, DatagramSocketOption.multicastLoopback, loop), + "Failed to set multicast loopback mode."); } /** Become a member of an IP multicast group. @@ -801,7 +802,9 @@ struct UDPConnection { */ void addMembership(ref NetworkAddress multiaddr) { - assert(false, "not implemented."); + scope addr = new RefAddress(multiaddr.sockAddr, multiaddr.sockAddrMaxLen); + enforce(eventDriver.sockets.joinMulticastGroup(m_socket, addr), + "Failed to add multicast membership."); } /** Stops listening for datagrams and frees all resources. From ebb32c477627836b91fbd8be27502e2a7cc42b0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Tue, 5 Sep 2017 10:29:39 +0200 Subject: [PATCH 2/2] Update eventcore dependency. --- dub.sdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dub.sdl b/dub.sdl index f5ec1d5..31ead3a 100644 --- a/dub.sdl +++ b/dub.sdl @@ -4,7 +4,7 @@ authors "Sönke Ludwig" copyright "Copyright © 2016, rejectedsoftware e.K." license "MIT" -dependency "eventcore" version="~>0.8.12" +dependency "eventcore" version="~>0.8.16" targetName "vibe_core"