nit icon indicating copy to clipboard operation
nit copied to clipboard

Teach nitcorn to listen to an unbinden port

Open privat opened this issue 9 years ago • 1 comments

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

privat avatar May 16 '16 18:05 privat

@jpcaissy Can you give us your insight about this one since you know the codebase?

privat avatar May 19 '16 15:05 privat