We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
new net.Socket
1 parent 5ce50ec commit 5885f46Copy full SHA for 5885f46
doc/api/net.markdown
@@ -281,12 +281,14 @@ Construct a new socket object.
281
`options` is an object with the following defaults:
282
283
{ fd: null
284
- type: null
285
- allowHalfOpen: false
+ allowHalfOpen: false,
+ readable: false,
286
+ writable: false
287
}
288
-`fd` allows you to specify the existing file descriptor of socket. `type`
289
-specified underlying protocol. It can be `'tcp4'`, `'tcp6'`, or `'unix'`.
+`fd` allows you to specify the existing file descriptor of socket.
290
+Set `readable` and/or `writable` to `true` to allow reads and/or writes on this
291
+socket (NOTE: Works only when `fd` is passed).
292
About `allowHalfOpen`, refer to `createServer()` and `'end'` event.
293
294
### socket.connect(port, [host], [connectListener])
0 commit comments