Skip to content

Proposal: Add a public API constant to net/http/https Server telling whereas the server is listening or not #4735

Closed
@cusspvz

Description

@cusspvz

It is not the first time that I've faced a situation where I had to check if a server is listening for connections.

I'm familiar with lib/net, so unfortunately I had to use ._handle with a little bit of tweaks.
Is there any reason why you guys didn't added one?

My proposal is to place up a method (maybe called .listening()) on net.Server's prototype that would return a bool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.netIssues and PRs related to the net subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions