File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -417,6 +417,9 @@ added: v0.3.4
417417 * ` allowHalfOpen ` {boolean} Indicates whether half-opened TCP connections
418418 are allowed. See [ ` net.createServer() ` ] [ ] and the [ ` 'end' ` ] [ ] event
419419 for details. ** Default:** ` false ` .
420+ * ` noDelay ` {boolean} A boolean with which to call [ ` socket.setNoDelay() ` ] [ ]
421+ when a socket connection is established. This only applies when the
422+ underlying connection is a TCP socket.
420423 * ` readable ` {boolean} Allow reads on the socket when an ` fd ` is passed,
421424 otherwise ignored. ** Default:** ` false ` .
422425 * ` writable ` {boolean} Allow writes on the socket when an ` fd ` is passed,
@@ -1262,6 +1265,7 @@ Returns `true` if input is a version 6 IP address, otherwise returns `false`.
12621265[ `socket.pause()` ] : #net_socket_pause
12631266[ `socket.resume()` ] : #net_socket_resume
12641267[ `socket.setEncoding()` ] : #net_socket_setencoding_encoding
1268+ [ `socket.setNoDelay()` ] : #net_socket_setnodelay_nodelay
12651269[ `socket.setTimeout()` ] : #net_socket_settimeout_timeout_callback
12661270[ `socket.setTimeout(timeout)` ] : #net_socket_settimeout_timeout_callback
12671271[ half-closed ] : https://tools.ietf.org/html/rfc1122
Original file line number Diff line number Diff line change @@ -378,6 +378,10 @@ function Socket(options) {
378378 this . server = null ;
379379 this . _server = null ;
380380
381+ if ( options . noDelay !== undefined ) {
382+ this . setNoDelay ( options . noDelay ) ;
383+ }
384+
381385 // Used after `.destroy()`
382386 this [ kBytesRead ] = 0 ;
383387 this [ kBytesWritten ] = 0 ;
You can’t perform that action at this time.
0 commit comments