List of usage examples for io.vertx.core.datagram DatagramSocket blockMulticastGroup
Future<Void> blockMulticastGroup(String multicastAddress, String networkInterface, String sourceToBlock);
From source file:examples.DatagramExamples.java
License:Open Source License
public void example7(Vertx vertx) { DatagramSocket socket = vertx.createDatagramSocket(new DatagramSocketOptions()); // Some code// ww w. j a v a 2 s . c o m // This would block packets which are send from 10.0.0.2 socket.blockMulticastGroup("230.0.0.1", "10.0.0.2", asyncResult -> { System.out.println("block succeeded? " + asyncResult.succeeded()); }); }