Added function to get random port value from 50000-100000 for P2P
connection