mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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:
1 parent
d795d93901
commit
a64d7f4e31
1 file changed
+10
@@ -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
|
||||
|
||||
Reference in new issue
Block a user