|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
have multiple clients connect to a server using gamekit? (over bluetooth)
Like what would be the basic steps? Or does anyone know of any good tutorials?
I have been trying to do some research on this online, and I think I have kind of got the idea, but i'm not completely sure what all of this does so could someone explain it? Also, I want to make sure it makes this connection over bluetooth, not WiFi, so is there a way to force it to do that. and i want one user to be the server and all of the rest to be clients (unless you think all of them being peers would be a better way to do this and you can tell me how to do it). and i cant use peer picker because it doesnt let you create your own interface. I think the basic steps are: 1. ask the user whether they want to be a server or client 2. server: initWithSessionID:displayName:sessionMode:GKSessionModeServer 3. clients: initWithSessionID:displayName:sessionMode:GKSessionModeClient 4. server: peersWithConnectionState:GKPeerStateAvailable 5. server: use connectToPeer:withTimeout: for all of the possible peers that peersWithConnectionState:GKPeerStateAvailable found 6. clients: have all of the other devices use acceptConnectionFromPeer:error: 7. everyone: setDataReceiveHandler:self withContext: 8. everyone: implement - (void) receiveData: (NSData *)data fromPeer: (NSString *)peer inSession: (GKSession *)session context: (void *)context; (in the same viewController class) and set it up to handle received data. 9. everyone: use sendData:toPeers:withDataMode:error: or sendDataToAllPeers:withDataMode:error: to send data when i want to thanks |
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| thread | Thread Starter | Forum | Replies | Last Post |
| Mail - deleting messages when have multiple Macs connecting to same accounts | eoren1 | Mac Basics and Help | 1 | Oct 19, 2011 03:34 PM |
| Why does Mac OS say 3 users are connected to my shares? I'm the only one connected? | alexreich | Mac OS X Server, Xserve, and Networking | 7 | Oct 2, 2011 02:16 PM |
| HELP!!! Corruption data with Parallels client connected to OS X Server 10.6.8 | will999 | Mac OS X Server, Xserve, and Networking | 5 | Sep 22, 2011 10:01 AM |
| problem using finder to connect to FTP server | stustaff | Mac OS X | 2 | Aug 31, 2011 02:27 AM |
| Problems Connecting to a Mini used as a Home Media Server | MacAlpha | Apple TV and Home Theater | 0 | Nov 23, 2009 03:40 PM |
All times are GMT -5. The time now is 12:56 PM.






Linear Mode

