Game Development Reference
In-Depth Information
{
NSLog(@"state == MCSessionStateConnecting");
}
else if (state == MCSessionStateNotConnected)
{
NSLog(@"state == MCSessionStateNotConnected");
}
}
- (void)session:(MCSession *)session
didReceiveData:(NSData *)data fromPeer:(MCPeerID
*)peerID {
// Data has been received from a peer.
// Do something with the received data, on the
main thread
[[NSOperationQueue mainQueue]
addOperationWithBlock:^{
// Process the data
}];
}
- (void)session:(MCSession *)session
didStartReceivingResourceWithName:(NSString
*)resourceName fromPeer:(MCPeerID *)peerID
withProgress:(NSProgress *)progress {
// A file started being sent from a peer. (Not
used in this example.)
}
- (void)session:(MCSession *)session
didFinishReceivingResourceWithName:(NSString*)resourceName
fromPeer:(MCPeerID *)peerID atURL:(NSURL *)localURL
withError:(NSError *)error {
// A file finished being sent from a peer. (Not
used in this example.)
}
- (void)session:(MCSession *)session
didReceiveStream:(NSInputStream *)stream
Search WWH ::




Custom Search