Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Docs: server.pause() server.address() socket.address()
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed May 9, 2011
1 parent 31ed87b commit 11beac7
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions doc/api/net.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ Start a server listening for connections on the given file descriptor.
This file descriptor must have already had the `bind(2)` and `listen(2)` system
calls invoked on it.

#### server.pause(msecs)

Stop accepting connections for the given number of milliseconds (default is
one second). This could be useful for throttling new connections against
DoS attacks or other oversubscription.

#### server.close()

Stops the server from accepting new connections. This function is
Expand All @@ -115,8 +121,9 @@ event.

#### server.address()

Returns the bound address of the server as seen by the operating system.
Useful to find which port was assigned when giving getting an OS-assigned address
Returns the bound address and port of the server as reported by the operating system.
Useful to find which port was assigned when giving getting an OS-assigned address.

This comment has been minimized.

Copy link
@TooTallNate

TooTallNate May 9, 2011

"when giving getting"? typo

Returns an object with two properties, e.g. `{"address":"127.0.0.1", "port":2121}`

Example:

Expand Down Expand Up @@ -298,6 +305,11 @@ data packet received and the first keepalive probe. Setting 0 for
initialDelay will leave the value unchanged from the default
(or previous) setting.

#### socket.address()

Returns the bound address and port of the socket as reported by the operating system.
Returns an object with two properties, e.g. `{"address":"192.168.57.1", "port":62053}`

#### socket.remoteAddress

The string representation of the remote IP address. For example,
Expand Down

0 comments on commit 11beac7

Please sign in to comment.