When trying to remotely browse the device filesystem, if the device transmits all IP addresses (see https://phabricator.kde.org/D6757), in that case the desktop application needs to test and determine which one to use.
We try to open a TCP connection on the addresses, one by one, using the transmitted port. When one succeeds, we break out of the loop and use this address to start sshfs.
This revision can probably be refined, but I wanted to present the idea.