1

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?

roob
  • 2,419
  • 3
  • 29
  • 45
  • 1
    Pardon my French, but **Bonjour** will let you advertise a service in a network. Clients can look for a service with the same name and find the port and address they need to connect to. – aleph_null Nov 13 '11 at 21:36

1 Answers1

4

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

Domestic Cat
  • 1,434
  • 11
  • 18
  • Thank you. This is a very helpful example. Just what I was looking for in terms of device discovery. – roob Nov 15 '11 at 19:35