Skip to content

Commit 919e581

Browse files
lpincajuanarbol
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 7bae433 commit 919e581

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
@@ -1024,6 +1024,16 @@ See [`writable.destroy()`][] for further details.
10241024

10251025
See [`writable.destroyed`][] for further details.
10261026

1027+
### `socket.destroySoon()`
1028+
1029+
<!-- YAML
1030+
added: v0.3.4
1031+
-->
1032+
1033+
Destroys the socket after all data is written. If the `'finish'` event was
1034+
already emitted the socket is destroyed immediately. If the socket is still
1035+
writable it implicitly calls `socket.end()`.
1036+
10271037
### `socket.end([data[, encoding]][, callback])`
10281038

10291039
<!-- YAML

0 commit comments

Comments
 (0)