Skip to content

Commit a64d7f4

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

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/api/net.md

+10
Original file line numberDiff line numberDiff line change
@@ -1049,6 +1049,16 @@ See [`writable.destroy()`][] for further details.
10491049

10501050
See [`writable.destroyed`][] for further details.
10511051

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

10541064
<!-- YAML

0 commit comments

Comments
 (0)