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 <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>
  • Loading branch information
clarkkozak authored and MylesBorins committed Sep 24, 2020
1 parent c5d27e1 commit ec6b78a
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 @@ -964,6 +964,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 ec6b78a

Please sign in to comment.