Since it's a different protocol, your socket.io would listen on another port.

So, I guess the game api itself is on abstract enough to be accepting player 
input and sending output in a common way, your connections protocols have to 
hook into this abstract API.

Now, socket connections and telnet ones should all be wrapped into object 
streams, I think (and I think socket.io basically is like an object stream).

That way on ticks your game engine doesn't care where it sends stuff data. And 
it doesn't care how the data comes in as it's always passed to the game engine 
in the same way.

And your both com protocols don't care what the data is, they just need to know 
they're wrapping client side into object stream and converting server data back 
into whatever is needed.

That way you can later add other protocols as well, like pure http (POST for 
input, sse endpoint for output or so).

I'm very curious how it turned out for you - is your project available online?

Former addict here :)

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/b1a0261f-5a8a-4475-88fd-03f1df723080%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to