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 3, 2023
1 parent 717bb5e commit 7ab7f2d
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 7ab7f2d

Please sign in to comment.