common: low-level websocket abstraction + a websocket transport
authorKrisztian Litkey <krisztian.litkey@intel.com>
Tue, 15 Jan 2013 12:20:07 +0000 (14:20 +0200)
committerKrisztian Litkey <kli@iki.fi>
Tue, 29 Jan 2013 15:16:51 +0000 (17:16 +0200)
commitf0c19f56010c38b8c48cd7db107effbdac698dc3
tree54f35c961c529c3d3d1cb4142f3e923658d342d8
parent33ae6402e9ecd95f67120f2d9b7beeb243b0580b
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:
configure.ac
src/Makefile.am
src/common/fragbuf.c [new file with mode: 0644]
src/common/fragbuf.h [new file with mode: 0644]
src/common/tests/Makefile.am
src/common/tests/fragbuf-test.c [new file with mode: 0644]
src/common/tests/transport-test.c
src/common/websocket.c [new file with mode: 0644]
src/common/websocket.h [new file with mode: 0644]
src/common/websocklib.c [new file with mode: 0644]
src/common/websocklib.h [new file with mode: 0644]
src/common/wsck-transport.c [new file with mode: 0644]
src/common/wsck-transport.h [new file with mode: 0644]