My current sessionMode is GKSessionModeServer. If I'm on a 开发者_运维问答client and I do the following:
[mySession sendDataToAllPeers:packet withDataMode:GKSendDataReliable error:nil];
Will that send data to every peer in the server or just to the server itself. Sorry for asking a simple question, but I only have 2 devices to test with.
Great question!
Yes, it will send the data to ALL the thingies connected to that server.
BTW if you're just getting started with networking, you may find this useful...
Most effective way to do networking on Mac/iPhone?
And here is an absolutely critical tip regarding gamekit:
Critical tip: Client/Server GKSessions
You have done the right thing by using GKSessionModeServer.
精彩评论