Skip to content

Commit

Permalink
doc: add socket.readyState
Browse files Browse the repository at this point in the history
+ 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]>
  • Loading branch information
clarkkozak authored and Trott committed Sep 23, 2020
1 parent a117887 commit 81379d1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,20 @@ written out, which may not be immediately.
See `Writable` stream [`write()`][stream_writable_write] method for more
information.

### `socket.readyState`
<!-- YAML
added: v0.5.0
-->

* {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
Expand Down

0 comments on commit 81379d1

Please sign in to comment.