@@ -722,25 +722,26 @@ that the
722
722
[ ` socket.connect(options[, connectListener]) ` ] [ `socket.connect(options)` ]
723
723
callback is a listener for the ` 'connect' ` event.
724
724
725
- ### ` socket.destroy([exception ]) `
725
+ ### ` socket.destroy([error ]) `
726
726
<!-- YAML
727
727
added: v0.1.90
728
728
-->
729
729
730
- * ` exception ` {Object}
730
+ * ` error ` {Object}
731
731
* Returns: {net.Socket}
732
732
733
- Ensures that no more I/O activity happens on this socket. Only necessary in
734
- case of errors (parse error or so) .
733
+ Ensures that no more I/O activity happens on this socket.
734
+ Destroys the stream and closes the connection .
735
735
736
- If ` exception ` is specified, an [ ` 'error' ` ] [ ] event will be emitted and any
737
- listeners for that event will receive ` exception ` as an argument.
736
+ See [ ` writable.destroy() ` ] [ ] for further details.
738
737
739
738
### ` socket.destroyed `
740
739
741
740
* {boolean} Indicates if the connection is destroyed or not. Once a
742
741
connection is destroyed no further data can be transferred using it.
743
742
743
+ See [ ` writable.destroyed ` ] [ ] for further details.
744
+
744
745
### ` socket.end([data[, encoding]][, callback]) `
745
746
<!-- YAML
746
747
added: v0.1.90
@@ -754,8 +755,7 @@ added: v0.1.90
754
755
Half-closes the socket. i.e., it sends a FIN packet. It is possible the
755
756
server will still send some data.
756
757
757
- If ` data ` is specified, it is equivalent to calling
758
- ` socket.write(data, encoding) ` followed by [ ` socket.end() ` ] [ ] .
758
+ See [ ` writable.end() ` ] [ ] for further details.
759
759
760
760
### ` socket.localAddress `
761
761
<!-- YAML
@@ -1261,13 +1261,16 @@ Returns `true` if input is a version 6 IP address, otherwise returns `false`.
1261
1261
[ `socket.connect(path)` ] : #net_socket_connect_path_connectlistener
1262
1262
[ `socket.connect(port)` ] : #net_socket_connect_port_host_connectlistener
1263
1263
[ `socket.connecting` ] : #net_socket_connecting
1264
- [ `socket.destroy()` ] : #net_socket_destroy_exception
1264
+ [ `socket.destroy()` ] : #net_socket_destroy_error
1265
1265
[ `socket.end()` ] : #net_socket_end_data_encoding_callback
1266
1266
[ `socket.pause()` ] : #net_socket_pause
1267
1267
[ `socket.resume()` ] : #net_socket_resume
1268
1268
[ `socket.setEncoding()` ] : #net_socket_setencoding_encoding
1269
1269
[ `socket.setTimeout()` ] : #net_socket_settimeout_timeout_callback
1270
1270
[ `socket.setTimeout(timeout)` ] : #net_socket_settimeout_timeout_callback
1271
+ [ `writable.destroyed` ] : stream.html#stream_writable_destroyed
1272
+ [ `writable.destroy()` ] : stream.html#stream_writable_destroy_error
1273
+ [ `writable.end()` ] : stream.html#stream_writable_end_chunk_encoding_callback
1271
1274
[ half-closed ] : https://tools.ietf.org/html/rfc1122
1272
1275
[ stream_writable_write ] : stream.html#stream_writable_write_chunk_encoding_callback
1273
1276
[ unspecified IPv4 address ] : https://en.wikipedia.org/wiki/0.0.0.0
0 commit comments