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

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

Closed
cusspvz opened this issue Jan 18, 2016 · 3 comments
Labels
feature request Issues that request new features to be added to Node.js. net Issues and PRs related to the net subsystem.

Comments

@cusspvz
Copy link
Contributor

cusspvz commented Jan 18, 2016

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.

@brendanashworth brendanashworth added net Issues and PRs related to the net subsystem. feature request Issues that request new features to be added to Node.js. labels Jan 18, 2016
@jhamhader
Copy link
Contributor

If this feature is to be added, I would be glad to work on it.

@cusspvz
Copy link
Contributor Author

cusspvz commented Jan 18, 2016

I've already attached a PR with proposed changes.

cusspvz pushed a commit to realizehit/server-api that referenced this issue Jan 18, 2016
@evanlucas
Copy link
Contributor

Closing as 5ef9989 just landed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js. net Issues and PRs related to the net subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants