I am trying to create an iPhone app that can listen to traffic on a specific network port.
The server on my network sends messages (different status messages for devices that are processed by the server) on a specific port.
My problem is that when creating a thread and makePairWithSocket, I block the port for others who want to send messages to the server, so I only want to listen to traffic on the specified port and then check for specific headers, and then use these messages. I know how to make a connection and talk to the server using write and read streams, but then I create a PairWithSocket and block the port for all other devices on the network.
Anyone who has suggestions on how to listen on a port in Objective-C without pairing with the server?
Thanks in advance Daniel
source share