Skip to content

Commit d36bcd8

Browse files
committed
doc: add argument information for socket.destroy()
1 parent 193afef commit d36bcd8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

doc/api/net.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -512,14 +512,17 @@ If `true` - [`socket.connect(options[, connectListener])`][`socket.connect(optio
512512
haven't yet finished. Will be set to `false` before emitting `connect` event
513513
and/or calling [`socket.connect(options[, connectListener])`][`socket.connect(options, connectListener)`]'s callback.
514514

515-
### socket.destroy()
515+
### socket.destroy([exception])
516516
<!-- YAML
517517
added: v0.1.90
518518
-->
519519

520520
Ensures that no more I/O activity happens on this socket. Only necessary in
521521
case of errors (parse error or so).
522522

523+
If `exception` is specified, an [`'error'`][] event will be emitted and any
524+
listeners for that event will receive `exception` as an argument.
525+
523526
### socket.destroyed
524527

525528
A Boolean value that indicates if the connection is destroyed or not. Once a

0 commit comments

Comments
 (0)