views:

78

answers:

0

Hi All,

I'm working in a game and one of its features is to let the user play with players near him.

I know that if I show a dialog to the user for choosing between to be a server or a client it's easy to pair 2 or more devices. However, I think I can do a little better work if I don't show the dialog to the user (most of them don't know what is a server or a client.. a host or a peer). So, my intention is that when the users touch over "play with friend" button, the iPhone starts its server and at same time starts browsing for servers.

So, I need an algorithm for pairing them where one iPhone takes the role of the server and the others take the rol of the clients.

I know that with GameKit it's possible to create a network of peers. But I want my game works in iPhone 2.x. So, I need Bonjour.

Do you have any suggestion? Any path to follow?

Thank you!!