Skip to content

Commit

Permalink
net: fix new net.Socket documentation
Browse files Browse the repository at this point in the history
`Socket` no longer accepts `type` option, and also accepts `readable`,
`writable` options.

fix #6541
  • Loading branch information
indutny committed Nov 19, 2013
1 parent 5ce50ec commit 5885f46
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions doc/api/net.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,14 @@ Construct a new socket object.
`options` is an object with the following defaults:

{ fd: null
type: null
allowHalfOpen: false
allowHalfOpen: false,
readable: false,
writable: false
}

`fd` allows you to specify the existing file descriptor of socket. `type`
specified underlying protocol. It can be `'tcp4'`, `'tcp6'`, or `'unix'`.
`fd` allows you to specify the existing file descriptor of socket.
Set `readable` and/or `writable` to `true` to allow reads and/or writes on this
socket (NOTE: Works only when `fd` is passed).
About `allowHalfOpen`, refer to `createServer()` and `'end'` event.

### socket.connect(port, [host], [connectListener])
Expand Down

0 comments on commit 5885f46

Please sign in to comment.