2009年6月10日 星期三

Game kit

2 functions:
(1) p2p connectivity:
create an ad-hoc Bluetooth network
(2) in-game voice

use GKSession class

not support first-generation iphone & ipod touch

each peer has a peerID

use displayNameForPeer to get peer's name

GKSessionDelegage: handle connection request

data handler: receive data from peer

3 session mode:
(1)server:
advertise sessionID
GKSessionModeServer
(2)client:
search for sessionID
(3)peer:
advertise sessionID & search for sessionID
GKSessionModePeer

沒有留言:

張貼留言