Correct net.createServer() API docs

This commit is contained in:
koichik authored and Ryan Dahl committed 2011-03-02 12:10:36 -08:00
1 parent 4e7c37b87c
commit 452df69964
1 file changed
+6 -1
+6 -1
View File
@@ -4,11 +4,16 @@ The `net` module provides you with an asynchronous network wrapper. It contains
methods for creating both servers and clients (called streams). You can include
this module with `require("net");`
### net.createServer(connectionListener)
### net.createServer([options], [connectionListener])
Creates a new TCP server. The `connectionListener` argument is
automatically set as a listener for the `'connection'` event.
`options` is an object with the following defaults:
{ allowHalfOpen: false
}
### net.createConnection(arguments...)
Construct a new socket object and opens a socket to the given location. When