Commit 5885f46 1 parent 5ce50ec commit 5885f46 Copy full SHA for 5885f46
File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -281,12 +281,14 @@ Construct a new socket object.
281
281
` options ` is an object with the following defaults:
282
282
283
283
{ fd: null
284
- type: null
285
- allowHalfOpen: false
284
+ allowHalfOpen: false,
285
+ readable: false,
286
+ writable: false
286
287
}
287
288
288
- ` fd ` allows you to specify the existing file descriptor of socket. ` type `
289
- specified underlying protocol. It can be ` 'tcp4' ` , ` 'tcp6' ` , or ` 'unix' ` .
289
+ ` 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).
290
292
About ` allowHalfOpen ` , refer to ` createServer() ` and ` 'end' ` event.
291
293
292
294
### socket.connect(port, [ host] , [ connectListener] )
You can’t perform that action at this time.
0 commit comments