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 <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
lpinca authored and juanarbol committed Mar 3, 2023
1 parent b4ea389 commit d8cb9d3
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 d8cb9d3

Please sign in to comment.