Skip to content

Commit

Permalink
doc: add documentation for socket.destroySoon()
Browse files Browse the repository at this point in the history
PR-URL: #46337
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
  • Loading branch information
lpinca authored and ruyadorno committed Jan 31, 2023
1 parent d795d93 commit a64d7f4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a64d7f4

Please sign in to comment.