Package java.nio.channels

Examples of java.nio.channels.DatagramChannel.join()


            groupInterfaces = Collections.list(NetworkInterface.getNetworkInterfaces());
        for (NetworkInterface groupInterface : groupInterfaces)
        {
            if (groupInterface.isLoopback() || groupInterface.isPointToPoint() || !groupInterface.supportsMulticast())
                continue;
            receiver.join(groupAddress, groupInterface);
        }

        active = true;

        senderThread = new Thread(new MulticastSender(sender), "Oort-Multicast-Sender-" + ids.incrementAndGet());
View Full Code Here


      dc.setOption(StandardSocketOptions.SO_REUSEADDR, true);
      dc.bind(new InetSocketAddress(8080));
      dc.setOption(StandardSocketOptions.IP_MULTICAST_IF, networkInterface);

      InetAddress group = InetAddress.getByName("180.90.4.12");
      MembershipKey key = dc.join(group, networkInterface);
    } catch (IOException e) {
      System.out.println(e.getMessage());
    }
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.