SuperWebSocket
SuperWebSocket copied to clipboard
Binding to port 0
When you bind to port 0, the system assigns you some unspecified available port. This is only useful if you can get that port back from SuperWebSocket, but it does not seem to expose the endpoint of the listener.
Example use-case: https://github.com/SirCmpwn/mdedit/blob/master/MDService.cs#L33-L34
Same issue for me as well. I have game servers that are created dynamically, and I can't seem to retrieve the server port without doing some hacky coding.
Probably you can implement this feature using endpoint runtime replacement like the code below: https://raw.githubusercontent.com/kerryjiang/SuperSocket/v1.6/QuickStart/WindowsAzure/SuperSocketRole/WorkerRole.cs