Skip to content

Commit

Permalink
Update juce_Socket.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasklingebiel authored Jan 9, 2023
1 parent 0006363 commit ab1bf01
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions modules/juce_core/network/juce_Socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,14 @@ bool DatagramSocket::joinMulticast (const String& multicastIPAddress)

return SocketHelpers::multicast (handle, multicastIPAddress, lastBindAddress, true);
}

bool DatagramSocket::joinMulticast (const String& multicastIPAddress, const String& localIPAddress)
{
if (handle < 0 || ! isBound)
return false;

return SocketHelpers::multicast (handle, multicastIPAddress, localIPAddress, true);
}

bool DatagramSocket::leaveMulticast (const String& multicastIPAddress)
{
Expand All @@ -763,6 +771,14 @@ bool DatagramSocket::leaveMulticast (const String& multicastIPAddress)

return SocketHelpers::multicast (handle, multicastIPAddress, lastBindAddress, false);
}

bool DatagramSocket::leaveMulticast (const String& multicastIPAddress, const String& localIPAddress)
{
if (handle < 0 || ! isBound)
return false;

return SocketHelpers::multicast (handle, multicastIPAddress, localIPAddress, false);
}

bool DatagramSocket::setMulticastLoopbackEnabled (bool enable)
{
Expand Down

0 comments on commit ab1bf01

Please sign in to comment.