diff --git a/core_manual_java.html b/core_manual_java.html index 312a04b..11f6e0c 100644 --- a/core_manual_java.html +++ b/core_manual_java.html @@ -929,7 +929,7 @@

Start the Server Listening


The first parameter to listen is the port. A wildcard port of 0 can be specified which means a random available port will be chosen to actually listen at. Once the server has completed listening you can then call the port() method of the server to find out the real port it is using.

The second parameter is the hostname or ip address. If it is omitted it will default to 0.0.0.0 which means it will listen at all available interfaces.

The actual bind is asynchronous so the server might not actually be listening until some time after the call to listen has returned. If you want to be notified when the server is actually listening you can provide a handler to the listen call. For example:

-
server.listen(1234, "myhost", new AsyncResultHandler<Void>() {
+
server.listen(1234, "myhost", new AsyncResultHandler<NetServer>() {
     public void handle(AsyncResult<NetServer> asyncResult) {
         log.info("Listen succeeded? " + asyncResult.succeeded());
     }
@@ -1572,7 +1572,7 @@ 

Start the Server Listening


The first parameter to listen is the port.

The second parameter is the hostname or ip address. If it is omitted it will default to 0.0.0.0 which means it will listen at all available interfaces.

The actual bind is asynchronous so the server might not actually be listening until some time after the call to listen has returned. If you want to be notified when the server is actually listening you can provide a handler to the listen call. For example:

-
server.listen(8080, "myhost", new AsyncResultHandler<Void>() {
+
server.listen(8080, "myhost", new AsyncResultHandler<HttpServer>() {
     public void handle(AsyncResult<HttpServer> asyncResult) {
         log.info("Listen succeeded? " + asyncResult.succeeded());
     }