Random peer selection algorithm in peer-to-peer game?
===

I'm developing a poker game for iPhone/iPad which uses Apple's matchmaking service. I'll be using a client-server topology where the dealer is the server. With each hand there will be a new server/dealer. However, before the initial dealer/server selection, the game uses peer-to-peer topology, which leaves me with my dilemma.

How do I get all the players/peers to agree on one random peer to be the initial dealer/server, quickly and efficiently?

I'm currently troubleshooting my own method by which I have each peer broadcast a random number. After all numbers have been received, they are sorted and the peer with the lowest number is the initial dealer. However, the issues I'm having with (duplicate numbers, etc) have prompted me to find a better solution.

Any help would be greatly appreciated.