}
@Test
public void testRemoteAddress() throws Exception {
server.connectHandler(socket -> {
SocketAddress addr = socket.remoteAddress();
assertEquals("127.0.0.1", addr.hostAddress());
}).listen(ar -> {
assertTrue(ar.succeeded());
vertx.createNetClient(new NetClientOptions()).connect(1234, "localhost", result -> {
NetSocket socket = result.result();
SocketAddress addr = socket.remoteAddress();
assertEquals("127.0.0.1", addr.hostAddress());
assertEquals(addr.hostPort(), 1234);
testComplete();
});
});
await();
}