I have to implement multiplayer game in which I am doing p2p communication using both bluetooth and WIFI. Specially for iphone 1G I have to do connection via WIFI. but in picker default connection type is bluetooth. So how to set it to WIFI. Can anyone suggest sample codes for WIFI connection. except GKtank. Thanks in advance.
A:
Hassan's answer is wrong.
GameKits peer-to-peer model can be used in two ways. The BlueTooth classes (that work with PeerPicker etc) basically implement Bonjour over Bluetooth. However, if you want to support Wifi and bluetooth the best thing to do is have a bonjour based "framework" for establishing the connections, but feed it either from the standard bonjour services (for Wifi) or from those established by GameKit over blue-tooth.
This post provides some good pointers, but in essence, you will need to use Bonjour to establish your Wifi peer-to-peer connection.
http://stackoverflow.com/questions/1049393/gamekit-in-iphone-sdk-3-0
buggles
2010-02-22 12:56:12
hey thank you very much. can you suggest any links where i'll get sample code for it.
amy
2010-02-22 13:44:26