Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: added documentation for socket.destroyed #6128

Closed
wants to merge 7 commits into from
4 changes: 4 additions & 0 deletions doc/api/net.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,10 @@ The amount of received bytes.

The amount of bytes sent.

### socket.destroyed

A `boolean` value that depicts if the connection is destroyed or not.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a bit more detail about what "destroyed" means?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look into the source to find out, I think something along the lines of "does not send or receive any more data, cannot be re-established", but I'm no expert on this topic :).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "indicates" might be a better choice of word than "depicts". Maybe something like this:

A Boolean value that indicates whether the connection has been destroyed or not.


### socket.connect(options[, connectListener])

Opens the connection for a given socket.
Expand Down