GeezerVison is showing github.com — doc: add argument information for socket.destroy() · nodejs/node@7aa2125
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: doc/api/net.md +4-1Lines changed: 4 additions & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -512,14 +512,17 @@ If `true` - [`socket.connect(options[, connectListener])`][`socket.connect(optio |
512 | 512 | haven't yet finished. Will be set to `false` before emitting `connect` event |
513 | 513 | and/or calling [`socket.connect(options[, connectListener])`][`socket.connect(options, connectListener)`]'s callback. |
514 | 514 |
|
515 | | -### socket.destroy() |
| 515 | +### socket.destroy([exception]) |
516 | 516 | <!-- YAML |
517 | 517 | added: v0.1.90 |
518 | 518 | --> |
519 | 519 |
|
520 | 520 | Ensures that no more I/O activity happens on this socket. Only necessary in |
521 | 521 | case of errors (parse error or so). |
522 | 522 |
|
| 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 | + |
523 | 526 | ### socket.destroyed |
524 | 527 |
|
525 | 528 | A Boolean value that indicates if the connection is destroyed or not. Once a |
|