Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues requesting new Node.js features.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