Search code examples
iphoneobjective-ciosbonjour

any examples of a server/client iphone app where both the server and clients are iOS devices?


I would like to create a server/client application where one iphone is running a server, and all other devices on the same wifi network can connect to the server device and send and receive information. Are there any examples of running a server on a device and letting other devices on the network search for it?

I looked into using GameKit, but the 16 person max limit is unfortunate. cocoaasyncsocket seems like a good option, but how do I set up one device as the server, and search for it on other devices?


Solution

  • The WiTap sample code may be what you're looking for (or at least a good place to start):

    http://developer.apple.com/library/ios/#samplecode/WiTap/Introduction/Intro.html