Can I implement two GKSession, one as a client and the other as a server at the same time? Is there a problem or any limitation to implement this connection with WiFi and Bluetooth? Thanks!
Asked
Active
Viewed 323 times
0
-
I finally created two different sessions for both GKSessionModeServer and GKSessionModeClient. – shiami Mar 14 '12 at 03:07
2 Answers
1
You can do this using GKSessionModePeer:
gkSession = [[GKSession alloc] initWithSessionID:nil displayName:nil sessionMode:GKSessionModePeer];
In peer mode, you act both as a client and as a server for other devices.

killdash10
- 706
- 5
- 12
-
-
Yes. "Note: The maximum size of a client-server game is 16 players." Source: http://developer.apple.com/library/ios/#DOCUMENTATION/NetworkingInternet/Conceptual/GameKit_Guide/GameKitConcepts/GameKitConcepts.html#//apple_ref/doc/uid/TP40008304-CH100-SW1 – didito Jun 07 '12 at 15:53
-
0
GKSessionModePeer seems only can connect to another peer. But I need to build up more complex network structure. So I finally created two different sessions for both GKSessionModeServer and GKSessionModeClient. And it can exist at the same time.

shiami
- 7,174
- 16
- 53
- 68