freePort function

Find a TCP port that can be opened