Android : Implementing a protocol for a client-server socket communication in Java

on Sunday, March 29, 2015


I'm developing a multi-player turn based game for Android - a poker game. I'm almost finished with the clinet game-play. Now I need to implement the multi-player thing.


I thought about using Web Services but I have no experience with that and I undertsand that socket-communication is faster.


I have some experience with writing socket-communication in Java: Using ObjectOutputStream and ObjectInputStream to exchange data (game-states and turn actions in this case).


But I have a concern with this approach - the server-side is platform-dependent. If I want to have an iPhone developer create the app for iPhone, he could not do this because the server expects Java code. Am I right?


And another question please: Can I implement normal-socket communication and then later easily change it to secure-socket communication? It's just that I need to learn how to use SSL and I don't want to go into it right now.


Thanks!


0 comments:

Post a Comment