[jboss-jira] [JBoss JIRA] (JGRP-1970) UDP: use MulticastSocket to send messages

Bela Ban (JIRA) issues at jboss.org
Thu Oct 22 09:43:00 EDT 2015


     [ https://issues.jboss.org/browse/JGRP-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bela Ban resolved JGRP-1970.
----------------------------
    Resolution: Done


> UDP: use MulticastSocket to send messages
> -----------------------------------------
>
>                 Key: JGRP-1970
>                 URL: https://issues.jboss.org/browse/JGRP-1970
>             Project: JGroups
>          Issue Type: Task
>            Reporter: Bela Ban
>            Assignee: Bela Ban
>             Fix For: 3.6.7
>
>
> Currently, due to [1], we use a {{MulticastSocket}} to _receive_ multicast packets, but a {{DatagramSocket}} to _send_ multicast packets (and send and receive unicast packets).
> The reason was that we needed to get the IP address and port of the sender of a message. Due to a programming error, this was not the case earlier.
> Now, I changed the code to use a {{MulticastSocket}} instead of a {{DatagramSocket}} to send multicasts (and send/receive unicasts).
> Works perfectly and performance (4 nodes) is about the same.
> In addition, we can now call {{MulticastSocket.setTimeToLive()}}, even on Windows, preventing the exception trying to set {{ip_ttl}} on Windows (java.net.DualStackPlainDatagramSocketImpl.setTimeToLive()).
> [1] https://issues.jboss.org/browse/JGRP-1765
> [2] https://github.com/belaban/JGroups/wiki/FAQ



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list