This content has been marked as final. Show 2 replies
I don't see the need to have separate communication channels, one for chat and one for the game. If you have a single one, the first step on the reader side would be to ask: what have I just read? If it's a chat message do one thing with it, and if it's a game move do another.
I'm not saying you couldn't solve this problem using a separate pair of communication channels, but I think the other approach is simpler.
I'll go further than that. I'd say that these days, any time you have any kind of client/server application, the first question you should ask is, is there any pressing reason why we can't just use a web server for the server do all communication over HTTP using a textual serialization mechanism like XML and preferably using REST?
The documentation and infrastructure for this stuff is so extensive these days, and the potential for repurposing is so great, that going any other way without a good reason is a waste of effort. Even if HTTP/REST/XML isn't an exact fit, it can still be worth it (at least for prototyping) just for the convenience.