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

binding port 0 not returning found free port number #117

Open
Reasoning-Technology opened this issue Feb 22, 2014 · 1 comment
Open

binding port 0 not returning found free port number #117

Reasoning-Technology opened this issue Feb 22, 2014 · 1 comment

Comments

@Reasoning-Technology
Copy link

Unless a person is implementing a standard service one is stuck with the hazardous task of binding to a free port. Fortunately sockets provide a service for this invoked by binding to port '0'. bind then returns the free number found so that it can be given to clients.

em-websocket server is indeed grabbing the next free port when asked to use port 0, but it does not make the port used available on the API, so we have no way of telling clients where to find the service implemented with ruby-em-websocktets.

Looking at the source code it looks like the result from the bind is thrown away. Can we get the port number back please?

@mloughran
Copy link
Collaborator

Sounds perfectly reasonable, please create a pull request :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants