diff --git a/doc/api/net.md b/doc/api/net.md index 72324760f88fc5..4d7f031d2cd70d 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -1028,6 +1028,20 @@ written out, which may not be immediately. See `Writable` stream [`write()`][stream_writable_write] method for more information. +### `socket.readyState` + + +* {string} + +This property represents the state of the connection as a string. + +* If the stream is connecting `socket.readyState` is `opening`. +* If the stream is readable and writable, it is `open`. +* If the stream is readable and not writable, it is `readOnly`. +* If the stream is not readable and writable, it is `writeOnly`. + ## `net.connect()` Aliases to