Skip to content

Commit

Permalink
doc: add argument information for socket.destroy()
Browse files Browse the repository at this point in the history
PR-URL: #7238
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
  • Loading branch information
Trott authored and Fishrock123 committed Jul 5, 2016
1 parent 9e9d7b8 commit 7aa2125
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -512,14 +512,17 @@ If `true` - [`socket.connect(options[, connectListener])`][`socket.connect(optio
haven't yet finished. Will be set to `false` before emitting `connect` event
and/or calling [`socket.connect(options[, connectListener])`][`socket.connect(options, connectListener)`]'s callback.

### socket.destroy()
### socket.destroy([exception])
<!-- YAML
added: v0.1.90
-->

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

If `exception` is specified, an [`'error'`][] event will be emitted and any
listeners for that event will receive `exception` as an argument.

### socket.destroyed

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

0 comments on commit 7aa2125

Please sign in to comment.