Reputation: 3557
I am trying to build an application that will require sending data between two devices over the internet. Sort of like GameKit, but I would like to implement the function without GameKit as I want to be able to exchange between different types of smart phones. I want it to be like a real-time match in GameCenter.
in GameKit I would be using the following:
//To send the data
- (BOOL)sendDataToAllPlayers:(NSData *)data withDataMode:(GKMatchSendDataMode)mode error:(NSError **)error;
//To receive the data
- (void)match:(GKMatch *)theMatch didReceiveData:(NSData *)data fromPlayer:(NSString *)playerID;
Is there a way to accomplish this same implementation without GameKit? I know the game Fun Run does real-time matches without GameCenter.
Any reply is greatly appreciated! Thanks in advance for your help!
Upvotes: 3
Views: 230
Reputation: 18816
Well, it's trivial with dedicated server with whom both devices open a persistent connection and probably impossible without it (how do your devices find each other if both of their IP addresses change?)
Upvotes: 1