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

doc: consider documenting allowHalfOpen property #38989

Closed
1 task done
pimterry opened this issue Jun 10, 2021 · 4 comments
Closed
1 task done

doc: consider documenting allowHalfOpen property #38989

pimterry opened this issue Jun 10, 2021 · 4 comments
Labels
doc Issues and PRs related to the documentations. stream Issues and PRs related to the stream subsystem.

Comments

@pimterry
Copy link
Member

📗 API Reference Docs Problem

  • Version: v16.2.0 (but applies to all)
  • Subsystem: streams

Location

Section of the site where the content exists

Affected URL(s):

Description

All duplex streams have an allowHalfOpen property, which is publicly visible and writeable, with no documentation AFAICT but also no indication that it's intended as an internal-only API.

The constructor option is documented, but not the property on the stream instance itself.

I have two questions:

  • Can I safely read this to check whether a given stream has allowHalfOpen enabled? I.e. is it a public API.
  • Can I safely write to this? I.e. can I change that after the stream is constructed (before the other end ends its half of the stream of course).

As far as I can tell the answer to both is yes, but I'm hoping somebody can confirm that, and if so I think it would be useful to document these explicitly.

If one or neither is safe of course that's useful information! In that case maybe this should be underscored or similar to make it clear that it's an internal API.


  • I would like to work on this issue and
    submit a pull request.
@pimterry pimterry added the doc Issues and PRs related to the documentations. label Jun 10, 2021
@bl-ue
Copy link
Contributor

bl-ue commented Jun 10, 2021

cc @nodejs/streams (or @mcollina @ronag)

@mcollina
Copy link
Member

This should be documented.

@pimterry
Copy link
Member Author

Excellent, ok! I'll put a PR together to document this.

@targos targos added the stream Issues and PRs related to the stream subsystem. label Aug 9, 2021
@Ayase-252
Copy link
Member

Closed as #39126 has been landed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. stream Issues and PRs related to the stream subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants