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 juanarbol committed Mar 5, 2023
1 parent 7bae433 commit 919e581
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 @@ -1024,6 +1024,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 919e581

Please sign in to comment.