Skip to content

Commit 47cd966

Browse files
authored
doc: add documentation for socket.destroySoon()
PR-URL: #46337 Reviewed-By: Paolo Insogna <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
1 parent 19bcba0 commit 47cd966

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/api/net.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,6 +1051,16 @@ See [`writable.destroy()`][] for further details.
10511051

10521052
See [`writable.destroyed`][] for further details.
10531053

1054+
### `socket.destroySoon()`
1055+
1056+
<!-- YAML
1057+
added: v0.3.4
1058+
-->
1059+
1060+
Destroys the socket after all data is written. If the `'finish'` event was
1061+
already emitted the socket is destroyed immediately. If the socket is still
1062+
writable it implicitly calls `socket.end()`.
1063+
10541064
### `socket.end([data[, encoding]][, callback])`
10551065

10561066
<!-- YAML

0 commit comments

Comments
 (0)