List of usage examples for io.vertx.core.net NetServer actualPort
int actualPort();
From source file:examples.NetExamples.java
License:Open Source License
public void example5_1(Vertx vertx) { NetServer server = vertx.createNetServer(); server.listen(0, "localhost", res -> { if (res.succeeded()) { System.out.println("Server is now listening on actual port: " + server.actualPort()); } else {// ww w. j a v a2 s . co m System.out.println("Failed to bind!"); } }); }