I guess you could use port 0 to get a random free port.