Take the 2-minute tour ×

Some of our integration tests need to bind a service to a socket. This often conflicts with an actual service (e.g. a web service, or another instance of the test... using the same socket)

We have got utilities to create unique temporary files, but is there something equivalent to create system-wide unique sockets?

share|improve this question
If you don't bind explicitly to a particular port number, systems assigns an ephemeral port number on its own. You can then query the port assigned. Is it what you need? –  Code Painters Mar 18 '13 at 14:24
Sounds about what I need. –  xtofl Mar 18 '13 at 15:33

Your Answer



Browse other questions tagged or ask your own question.