udp - On iOS, how do you use GCDAsyncUdpSocket to listen to two ports? -


I am using GCDAsyncUdpSocket on iOS (successfully) and using data by using UDP Receiving and receiving is as low as:

  udpSocket = [[GCDADINCDPSet alloc] initWithDelegate: self representative Que: dispatch_get_main_queue ()]; NSError * error; BOOL result = [udpSocket bindToPort: Error 3054: & amp; Error];  

The device sends back data to port 3054, which I see using the delegate call udpSocket: didReiveiveData: fromAddress: withFilterContext: . The device also sends information to the 9750 port, and I also see that, also. I have not tried to force a specific port, but it fails for other reasons. I have also tried to start a separate socket using

  udpDataSocket = [[GCDAsyncUdpSocket alloc]: initWithDelegate: self delegate queue: dispatch_get_main_queue ()]; NSError * error; BOOL result = [udpDataSocket bindToPort: 9750 Error: & amp; Error];  

There is no error in these calls, but I do not get data from port 9750.

I know to make sure the data is being sent; This is an issue on the iOS side I know this because:

  1. An argument analyzer reaches the device for transmission at port 9750; This is indicative, but not conclusive.

  2. I can switch to the port using the tool to send the second data stream in 3054, in this case my app sees the data, however, it is undesirable, although.

So, how does one read data from two data from a UDP port that uses GCDAsyncUdpSocket on iOS? / P>


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -