Use correct port for API communications (select the right one using the registered stream wrappers list)