Parametrize with an asynchronous getRemotePort function