3 ms·
I used to roll my own code for websockets since the protocol is so simple. Switched to libwebsockets when I had to support TLS since I did not wanted to fiddle
by Galanwe 5y ago
I used to roll my own code for websockets since the protocol is so simple. Switched to libwebsockets when I had to support TLS since I did not wanted to fiddle with openssl directly.
Overall the experience was good. It's simple, to the point. Configuration of the library is a bit like dark magic though, not much documentation.
> Has anyone used this in a multithreaded implementation
It's an event loop based library, so the point is more to have a single asynchronous main thread that fetches the messages, which you can dispatch to threads for processing if you wish.
- vlovich123 5y agoHave you tried libkj? It’s the c++ runtime that underpowers Cap’n’proto’s RPC layer as well as Cloudflare Workers. Has many of the same features - curious how you find the documentation. Disclaimer: I work at Cloudflare.
- Galanwe 5y agoI would love to, but I stopped bothering with C++ a long time ago, and just use C nowadays :-)
- clappski 5y ago>I did not wanted to fiddle with openssl directly It's actually fairly simple to use openssl directly if you have a good handle of sockets in general, it's basically just a case of doing some initialisation and using SSL_write/SSL_read in place of whatever write/read functions you were using before to write to the socket