Skip to content

Commit ec6b78a

Browse files
clarkkozakMylesBorins
authored andcommitted
doc: add socket.readyState
+ description of `socket.readyState` Note: YAML tag found in commit e697cfb Co-authored-by: Michael Auderer <[email protected]> PR-URL: #35262 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent c5d27e1 commit ec6b78a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

doc/api/net.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,20 @@ written out, which may not be immediately.
964964
See `Writable` stream [`write()`][stream_writable_write] method for more
965965
information.
966966

967+
### `socket.readyState`
968+
<!-- YAML
969+
added: v0.5.0
970+
-->
971+
972+
* {string}
973+
974+
This property represents the state of the connection as a string.
975+
976+
* If the stream is connecting `socket.readyState` is `opening`.
977+
* If the stream is readable and writable, it is `open`.
978+
* If the stream is readable and not writable, it is `readOnly`.
979+
* If the stream is not readable and writable, it is `writeOnly`.
980+
967981
## `net.connect()`
968982

969983
Aliases to

0 commit comments

Comments
 (0)