I've got a number of devices connected over wifi using GameKit. I have a simple UIAlertView
popping up when peers (clients) receive data. All but the sender (server) show this alert view when data is sent, so I'm wondering if that's a bug in my app or if that's expected behavior. If the device doing the sending is also a GKSessionModePeer
, I would expect it to "fire" its receiveData:
message as well since I'm sending to all peers.
Should I call a method manually at the same on the sender device? For example, if I wanted to send a "GameStart" packet to the 4 phones, the peers would call startGame:
in the receiveData:fromPeer:inSession:context:
method when it receives that packet and the sendee would be calling sendDataToAllPeers:
and call startGame:
on itself.
Does that sound right or is there a way to include the sender in the sendDataToAllPeers:
list so that it responds exactly the same as all connected peers?