parser.setOutput(handler);
socket.dataHandler(parser);
}
});
server.listen(port, hostName, new AsyncResultHandler<NetServer>() {
@Override
public void handle(AsyncResult<NetServer> asyncResult) {
if (asyncResult.succeeded()) {
// If using a wilcard port (0) then we ask the server for the actual port:
DefaultEventBus.this.serverID = new ServerID(server.port(), hostName);