Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to resolved Multiple Address in Bonjour based ios application?
    primarykey
    data
    text
    <p>I am trying to Implement Banjour based application in ios. I implement success fully also sending and receiving data to one iphone to another iphone. After browsing the services all other device in the work. and display in to the Table.</p> <p><img src="https://i.stack.imgur.com/DtPWA.png" alt="enter image description here"> </p> <p>Now i want to select some devices in the table view, and send data to the selected devices </p> <p><img src="https://i.stack.imgur.com/rXeVn.png" alt="enter image description here"></p> <p>For that i created only one socket in each device.</p> <pre><code>CFSocketContext socketCtxt = {0, self, NULL, NULL, NULL}; witap_socket = CFSocketCreate(kCFAllocatorDefault, PF_INET6, SOCK_STREAM, IPPROTO_TCP, kCFSocketAcceptCallBack, (CFSocketCallBack)&amp;TCPServerAcceptCallBack, &amp;socketCtxt); if (witap_socket != NULL) { protocolFamily = PF_INET6; } else { witap_socket = CFSocketCreate(kCFAllocatorDefault, PF_INET, SOCK_STREAM, IPPROTO_TCP, kCFSocketAcceptCallBack, (CFSocketCallBack)&amp;TCPServerAcceptCallBack, &amp;socketCtxt); if (witap_socket != NULL) { protocolFamily = PF_INET; } } </code></pre> <p>now i want to send data to the selected devices. for that I stored selected NSNetService(ie devices) another NSMutableArray. When used Click the send button particular Action will invoked.</p> <pre><code>-(void)SendActionFunction { for(int idx=0;idx&lt;[selectedSer count];idx++) { NSNetService *service = [self.selectedSer objectAtIndex:idx]; NSLog(@"service......%@",[service name]); self.currentResolve = [self.selectedSer objectAtIndex:idx]; [self.currentResolve setDelegate:self]; [self.currentResolve resolveWithTimeout:0.0]; } } </code></pre> <p>if i am trying to Resolve address for each device(above code). It will resolve only for first device. and getting error </p> <ul> <li><strong>(Error code=-72003]</strong></li> </ul> <p>one more problem if i resolved address for a device it automatically remove from Tableview.</p> <p>So my doubts are:</p> <ol> <li>Why the selected device revoved? </li> <li>Now i create TCP based socket, How to add destination address to send data?</li> <li>Is it possible to send data from single socket to multiple destination?</li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload