I had a similar need and ended up writing my own socket wrapper to support websockets and tls encryption in emscripten and native. I adapted the base socket API code from the *mbedtls* library, added SSL support from that same library, then wrote the websocket protocol handling, which is fortunately a pretty small and easy to implement spec.
On Sun, May 15, 2022 at 10:21 PM Pinguin Pinguin <[email protected]> wrote: > Hi > > I have not found any lib jet. And it looks like a not solved problem to me. > We look into boost::asio at the moment and hope that "Emulated POSIX TCP > Sockets over WebSockets" works for us. > > Kolja > > On Saturday, May 14, 2022 at 4:51:51 AM UTC+2 [email protected] wrote: > >> Hi, >> >> If you find one please tell me! I had to do this myself recently and >> ended up having to write my own websocket wrapper that uses the >> 'ixwebsocket' library for native builds and some custom JS for emscripten. >> Be happy to share the code although it's got a far bit of custom stuff in >> there so it's probably not much use 'as is'. >> >> Bye, >> Mark >> >> On Monday, May 9, 2022 at 11:41:21 PM UTC+12 [email protected] wrote: >> >>> Hi >>> >>> we are searching for a C++ lib that provides WebSocket functionality for >>> native and emscripten. We want to have one code base for the native >>> Win/Mac/Linux/Android/iOS and the web version of our game. >>> >>> We found native libs like websocketpp or boost beast but it looks like >>> none of them has emscripten support. >>> >>> Any hints or tips? >>> >>> Thanks a lot >>> Kolja >>> >> -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/emscripten-discuss/9753ca9a-c249-4894-9460-de25a201a3e3n%40googlegroups.com > <https://groups.google.com/d/msgid/emscripten-discuss/9753ca9a-c249-4894-9460-de25a201a3e3n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAH7dc6v_MNeQnwDR_NY-YWuM3QEs-v5FHyAbKBOV9EaErQrzzQ%40mail.gmail.com.
