GKSession sendDataToAllPeers including sendee?

Posted by Typeoneerror on Stack Overflow See other posts from Stack Overflow or by Typeoneerror
Published on 2010-06-10T05:10:00Z Indexed on 2010/06/10 5:12 UTC
Read the original article Hit count: 274

Filed under:
|

I've got a number of devices connected over wifi using GameKit. I have a simple UIAlertView popping up when peers receive data. All but the sendee 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.

Should call a method manually at the same on the sendee 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 just sendData and call startGame: on itself. Does that sound right or is there a way to include the sendee in the sendData list so that it responds exactly the same as all connected peers?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about gamekit