how to get the port?