If port passed in to tidc_open_connection() is 0, use the default port.