diff --git a/doc/api/net.md b/doc/api/net.md index f55c3d6d17b2bc..4b8a9f123c06eb 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -1051,6 +1051,16 @@ See [`writable.destroy()`][] for further details. See [`writable.destroyed`][] for further details. +### `socket.destroySoon()` + + + +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])`