pass the string format of port number to native function