- How can I specify "pick any available port" for a TCP based server in Boost?
- And how do I retrieve the port once a connection is accepted?
UPDATED: By "available port" I mean: the OS can pick any available port i.e. I do not want to specify a port.
UPDATED: By "available port" I mean: the OS can pick any available port i.e. I do not want to specify a port.
Question 1: Use port number 0
Question 2: Use acceptor.local_endpoint().port()