0

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

Mats Stijlaart
  • 5,058
  • 7
  • 42
  • 58

1 Answers1

0

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
  • 4,585
  • 6
  • 30
  • 43
  • Thanks for the answer, but can you be more specific? Do i have to open more NetServices? Thanks – Mats Stijlaart Aug 13 '10 at 09:35
  • 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 Aug 13 '10 at 09:54