diff --git a/doc/api/net.md b/doc/api/net.md index 5fb6246b8d8f92..f328320a5c8b2d 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -1049,6 +1049,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])`