Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update core_manual_java.html #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core_manual_java.html
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ <h3 id="start-the-server-listening">Start the Server Listening</h3><br/>
<p>The first parameter to <code>listen</code> is the port. A wildcard port of <code>0</code> 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 <code>port()</code> method of the server to find out the real port it is using.</p>
<p>The second parameter is the hostname or ip address. If it is omitted it will default to <code>0.0.0.0</code> which means it will listen at all available interfaces.</p>
<p>The actual bind is asynchronous so the server might not actually be listening until some time <em>after</em> 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 <code>listen</code> call. For example:</p>
<pre class="prettyprint">server.listen(1234, "myhost", new AsyncResultHandler&lt;Void&gt;() {
<pre class="prettyprint">server.listen(1234, "myhost", new AsyncResultHandler&lt;NetServer&gt;() {
public void handle(AsyncResult&lt;NetServer&gt; asyncResult) {
log.info("Listen succeeded? " + asyncResult.succeeded());
}
Expand Down Expand Up @@ -1572,7 +1572,7 @@ <h3 id="start-the-server-listening_1">Start the Server Listening</h3><br/>
<p>The first parameter to <code>listen</code> is the port.</p>
<p>The second parameter is the hostname or ip address. If it is omitted it will default to <code>0.0.0.0</code> which means it will listen at all available interfaces.</p>
<p>The actual bind is asynchronous so the server might not actually be listening until some time <em>after</em> 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 <code>listen</code> call. For example:</p>
<pre class="prettyprint">server.listen(8080, "myhost", new AsyncResultHandler&lt;Void&gt;() {
<pre class="prettyprint">server.listen(8080, "myhost", new AsyncResultHandler&lt;HttpServer&gt;() {
public void handle(AsyncResult&lt;HttpServer&gt; asyncResult) {
log.info("Listen succeeded? " + asyncResult.succeeded());
}
Expand Down