From 5885f464f0ad372efa7ef44a72df6d44acec3085 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Tue, 19 Nov 2013 11:02:26 +0400 Subject: [PATCH] net: fix `new net.Socket` documentation `Socket` no longer accepts `type` option, and also accepts `readable`, `writable` options. fix #6541 --- doc/api/net.markdown | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/api/net.markdown b/doc/api/net.markdown index d80e80b4a5..513acb117e 100644 --- a/doc/api/net.markdown +++ b/doc/api/net.markdown @@ -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])