nit
nit copied to clipboard
Teach nitcorn to listen to an unbinden port
Sometime, especially for tests, we want that a server listen to any available port.
The C socket API features this possibility:
- either bind to the port 0
- or just do not bind() (directly call listen())
To get the port (to communicate it to the client), use getsockname() after the listen()
Related to #2084 and #2031
@jpcaissy Can you give us your insight about this one since you know the codebase?