Changed the signature for port num from int to char*