diff --git a/doc/api/net.md b/doc/api/net.md index 7d70e905be1563..28de44d8897246 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -964,6 +964,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