I have used this library before, it's a powerful library indeed but the documentation is a bit lacking. There isn't a straightforward guide to do the most common operations, even the most simple ones like connecting a client to a server, and you're left with studying the various examples provided, each of them do things a little differently. There are also a lot of undocumented functions/constants/structs.
We use libwebsockets in Ardour (a cross-platform digital audio workstation) to provide the ability to create control surfaces (GUIs) within the browser. We mostly treat it as a transport layer for OSC messages, which could otherwise be transferred via UDP (if the endpoint wasn't a browser).
How does this fare compared to uWebSockets? <a href="https://github.com/uNetworking/uWebSockets" rel="nofollow">https://github.com/uNetworking/uWebSockets</a>
I wrote something similar, except instead of providing a library (which Libwebsockets already does a fine job of), I created a server/framework accepting shared objects as backend plugins running as dedicated threads interacting with spsc lockless ringbuffers. In other words, more or less the inverse of a library: <a href="https://github.com/wbudd/ringsocket" rel="nofollow">https://github.com/wbudd/ringsocket</a><p>I haven't been putting much time into it anymore lately, but I intend to create a bunch of language bindings for it soon so you can write plugins in other languages too such as Python, C++, Rust, etc. Should be interesting.
I personally prefer QtWebSockets.
I've used libwebsockets before, but I found the API error prone and crusty, and ended up eventually converting it to QWebSockets. That turned out to be a good move.
Not a library [1], but trivial to integrate in your architecture. Just redirect stdout to gwsocket<p>[1] <a href="https://gwsocket.io/" rel="nofollow">https://gwsocket.io/</a>
I remember hearing about it many years ago, and am surprised to find it alive, and well now.<p>I always felt that the web people were never about performance, since there were many "pure C" webdev attempts before without much success.<p>Nginx can very realistically handle 1-2M requests per minute on commodity hardware, and no customisation, and that's from the disk.<p>Were somebody really serious about web performance, I think going from millions of requests per minute, to millions of requests per second is 100% possible.<p>I worked on this problem around 6 years ago, when I had a task of squeezing HTTP, and network perf on some API servers close to hardware limits. The task was mostly about gluing DPDK to popular software: nginx, memcached, postgres.<p>I am very enthusiastic to see Libwebsockets getting glib support. Glib is a one of a kind piece of software in the C ecosystem with which you can adopt modern programming methods, and in general approach it as you do it in a big "platform" like environment like NODEJS. Glib is really undeserving neglected, and overlooked.