socketio / socket.io-client-cpp

C++11 implementation of Socket.IO client
MIT License
2.26k stars 729 forks source link

Emscripten support #113

Open JMLX42 opened 8 years ago

JMLX42 commented 8 years ago

Hi,

I'm working on Minko (https://github.com/aerys/minko). We're building a cross-platform 3D/VR engine. We're targeting Windows, OSX, Linux, iOS, Android and HTML5 with a single C++11 code base. And we want to add real-time networking.

It makes sense to us to work with WebSockets even for the native builds because it should behave nicely on enterprise networks without configuration (opening ports). We also want all the cool features provided by Socket.io (mainly HTTP fallback). So we're very interested in being able to use socket.io-client-cpp as our one and only networking framework across all native and HTML5 builds.

We're using Emscripten (https://github.com/kripken/emscripten) to compile our C/C++ code to HTML5. I have a few questions regarding Emscripten's support for socket.io-client-cpp:

  1. Has anyone ever tried socket.io-client-cpp with Emscripten?
  2. Is there any dependencies of socket.io-client-cpp that might not work with Emscripten?
  3. Can we build socket.io-client-cpp without boost? Or using only boost headers?
  4. Emscripten automatically turns UNIX sockets into WebSockets: is there a switch to disable WebSocket framing in socket.io-client-cpp (so it uses raw UNIX sockets) and let Emscripten do the WebSocket framing job?

Thanks for your help!

jmigual commented 2 years ago

Hi, I don't have an answer to all of your questions but at least now I can tell you that:

  1. Can we build socket.io-client-cpp without boost? Or using only boost headers?

The boost library requirement has been removed from this library so now it is no longer needed.

For the other questions I don't have an answer. Has there been an update on emscripten side regarding websockets?