Is that right? Yes, it's almost right.
Here it is in detail: host A sends data to host B1
host B1 sends data to host A
host B2 sends data to hast A
host A: iOS device
host B1 + B2: external devices (not iOS)
Is B1’s source port fixed? Yes it is. The ports for B1 + B2 are fixed.
The port on A is not fixed, but I have to tell this used port to the other machines.
My totally special requirement is to solve this issue with "only" one socket instance.
One instance for streaming data to B1 and receive data from B2 or B1.
I think with BSD sockets that is possible. Receive data from "any" and send data to specific machine.
I know that I could solve this issue with NWListener who listen on port xyz for data.
And send data after the connection handler setup is finished. But that would be 2 sockets in my opinion.
Or you have other ideas or suggestions?
Topic:
App & System Services
SubTopic:
Networking
Tags: