Skip to content

doc: consider documenting allowHalfOpen property #38989

Closed
@pimterry

Description

@pimterry

📗 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to the documentations.streamIssues and PRs related to the stream subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions