views:

15

answers:

1

Heey

I want to make a netservice where more ipads can connect to at the same time.

I made a one 1 iPad open a NSNetservice and open the in- and outputstream.

I started a netservice on iPad A,

When connecting with iPad B to iPad A this just works fine. But when iPad C tries to connect the following happens: - Tries to resolve the NSNetService. - Resolves succesfull - Open input stream - Open output stream (eventCode equals NSStreamEventOpenCompleted) - End encountered

Because of the end encounters i cant connect, thats clear for me, but how do i make it work?

Is it possible to connect with more devices on the same netstream? Or do i have to make another solution?

Thanks

A: 

I think you have to create a new thread for each connection. At least, this worked for me when I built a message app for the iPhone. Each connection will hold the thread, and wait for a response (the thread will 'freeze').

dododedodonl
Thanks for the answer, but can you be more specific?Do i have to open more NetServices?Thanks
Mats Stijlaart
I once made a chat app, and users could connect to my iPhone (server) to talk to eachother (clients)... Each client connection had his own thread...http://www.iphoneexamples.com/There you'll find how to ;)
dododedodonl