1

I would like to communicate between my browser on the client PC and a C++ socket server running on an another PC. I researched online pretty much enough. I came across socket.io, HTML5 Websockets.

Though I am not sure about socket.io, websockets require a server that supports websockets. The pure old C++ socket server does not. Changing the server side is not an option. Is there anything else I can do with websockets?

Using socket.io, can I achieve the goal without installing an interpreter like nodejs on the server side? Any additional introduction of Javascript/Jquery library on the client side is affordable.

Or is there any other approach I can use?

Thank you.

  • You can write your own websocket handler on top of sockets, or, use a lib (I am almost sure, someone has already written one). – tkausl Jun 24 '16 at 05:23
  • Thanks tkausl. Would you mind briefing it a little? – Prasanna Hegde Jun 30 '16 at 09:10
  • Please check this : http://stackoverflow.com/questions/39841942/communicating-between-nodejs-and-c-using-node-ipc-and-unix-sockets – MGR Feb 28 '17 at 08:33

1 Answers1

1

C++ sockets and websockets are quite different things, having "socket" in their names doesn't mean they operate the same. Websockets protocol is RFC6455. There're several C++ libraries for implementing websocket support, if you can't use any type of web server.

buld0zzr
  • 962
  • 5
  • 10