This question may be too broad, but I think it is a worthy question, and I'm not sure how to deal with it.
I currently have a site on example.com. I am doing this using 100% node.js at the moment. I also host an HTML5 network game (at game.example.com) that uses socket.io , which is fantastic, but I decided it was better to handle the game server using C ++ (or maybe Java) and am planning on translating server logic from JavaScript.
My biggest problem at the moment is that I just donβt know how I will connect the WebSocket. I still plan to serve the full client (HTML and JavaScript) using node.js, but I would like the client to connect to the C ++ server, and not to the node.js server.
The way I'm connecting to the server now just uses the socket obtained from socket.io io.connect(); . I think this can stay, I just need to pass the server-side socket from node.js to my C ++ program, and I absolutely don't know how to do this.
Can anybody help me?
source share