1

I want to connect 3 iOS devices with each other. For example, One iOS device will be like a server, and other 2 device will connect like client, to that server. To make iOS Device, as server, i am using CocoaHTTPServer, There is no any internet connection, should use only wi - fi connection.

Any suggestion ?

kokemomuke
  • 554
  • 7
  • 10
  • What do you mean by connect... with each other? Do you want to exchange data directly amongst these 3 devices? Why do you decide that you need one device as a server and using CocoaHTTTPServer? – user523234 Mar 21 '13 at 08:27
  • I mean exchange some data between devices with wi-fi. Yeah, this may be bad idea. I found something like bonjour, – kokemomuke Mar 21 '13 at 09:12
  • Check out this tutorial: http://www.raywenderlich.com/12735/how-to-make-a-simple-playing-card-game-with-multiplayer-and-bluetooth-part-1 – AMayes Mar 22 '13 at 00:03
  • AMayes, bluetooth is not good solution. The distance is too short! – kokemomuke Mar 22 '13 at 04:36

2 Answers2

1

I suggest you to use bonjour protocol which is used in ichat..this helps to deal with your problem.. These links may help you..

http://en.wikipedia.org/wiki/Bonjour_%28software%29

http://en.wikipedia.org/wiki/Apple_Filing_Protocol

Kundan
  • 3,084
  • 2
  • 28
  • 65
0

ok, i solved this problem. What i have:
(1) one wi-fi router
(2) two iOS devises.

Create local wi-fi network,
Connect 2 devises.
one of the devise will be server, by using this open source library CocoaHTTPServer.
example:
https://github.com/robbiehanson/CocoaHTTPServer/tree/master/Samples/iPhoneHTTPServer

in the iPhone(which is server) you should find the ip, that given by wi fi network, like 192.168.0.101

And uala, go to the iphone browser(which is not server) and write url:192.168.0.101:9999 number

kokemomuke
  • 554
  • 7
  • 10