You write that the data comes from multiple iOS devices that should be able to send as well as receive.
Unfortunately, some important details are missing. You didn't describe how the devices find each other, or if it's a fixed set of known devices at startup. of known devices. Is there a maximum length for the messages? Should the exchange be blocking or asynchronous? Should they be sent and received simultaneously?
Before you solve something like this yourself with threads and synchronization, or install a web server on each computer, you could check if it can be solved e.g. with MPI.
https://en.wikipedia.org/wiki/Message_Passing_Interface