node.js webserver and C++ game server
This question may be too broad, but I think it's a decent question to ask,
and I'm not sure how to handle it.
I'm currently hosting a website at example.com. I'm doing this using 100%
node.js, at the moment. I'm also hosting a networked HTML5 game (at
game.example.com) that uses socket.io, which is fantastic, but I have
decided that I would rather handle the game server using C++ (or,
potentially, Java) and am planning on translating the server logic from
JavaScript.
My biggest problem at the moment is that I simply don't know how I would
connect the WebSocket. I still plan on serving the full client (HTML and
JavaScript) using node.js, but I would like the client to connect to the
C++ server rather than the node.js server.
The way that I'm currently connecting to the server is simply using a
socket gained from socket.io's io.connect();. I think this can remain, I
just need to pass the socket on the server-side from node.js to my C++
program, and I have absolutely no idea how to do this.
Can anyone help me?
No comments:
Post a Comment