Skip to content

Commit 81379d1

Browse files
clarkkozakTrott
authored andcommitted
doc: add socket.readyState
+ description of `socket.readyState` Note: YAML tag found in commit e697cfb Co-authored-by: Michael Auderer <mike@silverstone.io> PR-URL: #35262 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent a117887 commit 81379d1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

doc/api/net.md

+14
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,20 @@ written out, which may not be immediately.
10281028
See `Writable` stream [`write()`][stream_writable_write] method for more
10291029
information.
10301030

1031+
### `socket.readyState`
1032+
<!-- YAML
1033+
added: v0.5.0
1034+
-->
1035+
1036+
* {string}
1037+
1038+
This property represents the state of the connection as a string.
1039+
1040+
* If the stream is connecting `socket.readyState` is `opening`.
1041+
* If the stream is readable and writable, it is `open`.
1042+
* If the stream is readable and not writable, it is `readOnly`.
1043+
* If the stream is not readable and writable, it is `writeOnly`.
1044+
10311045
## `net.connect()`
10321046

10331047
Aliases to

0 commit comments

Comments
 (0)