common: low-level websocket abstraction + a websocket transport
Our low-level websocket library is built on top of libwebsockets.
It basically provides the necessary bits of glue to pump websocket
connections from a Murphy mainloop. Additionally it attempts to do
most of the heavy lifting necessary to associate extra contextual
data with websockets (IOW attaching/detaching in a safe manner
user data with websocket contexts and connections) which I found
surprisingly hairy to do with libwebsockets itself.
Eventually the low-level library should map out all the useful
features of the underlying library. We're far not there at the
moment. We do not provide an interface for features that we do not
need ourselves at the moment. These include things like connection
filtering, pure HTTP connections, serving files to clients, extension-
negotiation, etc. Of these at least SSL-support, pure HTTP clients
and content-serving (for serving our own javascript libraries to
clients) are next on the list to map out.
The websocket transport basically integrates websockets to our
transport abstraction. IOW, it makes it possible to use a websocket
connection as the underlying IPC mechanism for a Murphy transport.
As a side-effect of implementing websocket transports, an automagic
defragmentation mechanism (fragbuf or mrp_fragbuf_t) has also been
added to the common murphy library.
13 files changed: