Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-1970

UDP: use MulticastSocket to send messages

    Details

    • Type: Task
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 3.6.7
    • Labels:
      None

      Description

      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

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                belaban Bela Ban
                Reporter:
                belaban Bela Ban
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: