Use bind() function , hope it solves your requirement
In reply to Re: IO:: SOCKET Check Port, Please Help! by abubacker in thread IO:: SOCKET Check Port, Please Help! by rizcotech