GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
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?
Sounds perfectly reasonable, please create a pull request :)