doc: add documentation for socket.destroySoon()

PR-URL: https://github.com/nodejs/node/pull/46337
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit is contained in:
Luigi Pinca authored and ruyadorno@google.com committed 2023-01-31 18:16:10 -05:00
1 parent d795d93901
commit a64d7f4e31
1 file changed
+10
+10
View File
@@ -1049,6 +1049,16 @@ See [`writable.destroy()`][] for further details.
See [`writable.destroyed`][] for further details.
### `socket.destroySoon()`
<!-- YAML
added: v0.3.4
-->
Destroys the socket after all data is written. If the `'finish'` event was
already emitted the socket is destroyed immediately. If the socket is still
writable it implicitly calls `socket.end()`.
### `socket.end([data[, encoding]][, callback])`
<!-- YAML