Don't brute force the server port. Open one, and get its number.
Merge pull request #2 from vsekhar/master

Don't brute force the port number, have the OS give you one directly.