File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -684,13 +684,14 @@ listeners for that event will receive `exception` as an argument.
684
684
* {boolean} Indicates if the connection is destroyed or not. Once a
685
685
connection is destroyed no further data can be transferred using it.
686
686
687
- ### socket.end([ data] [ , encoding ] )
687
+ ### socket.end([ data] [ , encoding ] [ , callback ] )
688
688
<!-- YAML
689
689
added: v0.1.90
690
690
-->
691
691
692
692
* ` data ` {string|Buffer|Uint8Array}
693
693
* ` encoding ` {string} Only used when data is ` string ` . ** Default:** ` 'utf8' ` .
694
+ * ` callback ` {Function} Optional callback for when the socket is finished.
694
695
* Returns: {net.Socket} The socket itself.
695
696
696
697
Half-closes the socket. i.e., it sends a FIN packet. It is possible the
@@ -1168,7 +1169,7 @@ Returns `true` if input is a version 6 IP address, otherwise returns `false`.
1168
1169
[ `socket.connect(path)` ] : #net_socket_connect_path_connectlistener
1169
1170
[ `socket.connect(port, host)` ] : #net_socket_connect_port_host_connectlistener
1170
1171
[ `socket.destroy()` ] : #net_socket_destroy_exception
1171
- [ `socket.end()` ] : #net_socket_end_data_encoding
1172
+ [ `socket.end()` ] : #net_socket_end_data_encoding_callback
1172
1173
[ `socket.pause()` ] : #net_socket_pause
1173
1174
[ `socket.resume()` ] : #net_socket_resume
1174
1175
[ `socket.setEncoding()` ] : #net_socket_setencoding_encoding
You can’t perform that action at this time.
0 commit comments