afb-proto-ws: Split afb-stub-ws in two 4.99.1 eel/4.99.1 eel_4.99.1
authorJosé Bollo <jose.bollo@iot.bzh>
Fri, 8 Sep 2017 13:59:00 +0000 (15:59 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Tue, 12 Sep 2017 08:20:09 +0000 (10:20 +0200)
commit159c895986f2358d6df8bb5804cc4419cc6b457f
tree7c6e43fe9c412bfa30d33e75dbce114b7540ce37
parent6415707ead57b42a52e7752dc197a5dac479ce3d
afb-proto-ws: Split afb-stub-ws in two

The file afb-stub-ws is split in two parts:
 - afb-stub-ws: implements the interface between
   xreq and protocol.
 - afb-proto-ws: implements the pbinary protocol
   over wer sockets

The intent is to have a clean separation between
a kind of generic stub and the protocol implmentation.

This will allow soon to provide a library to access
directly in C to the websocket of an API exposed
through the otpion --ws-server.

At the moment, the protocol implementation is on
websockets but in the futur it will be cleanly
rewritten to use any binary transport.

This commit also fixe a double free in subcalls.

Change-Id: I831787533db9fe073d060dd8ee9401cbab2894e1
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/CMakeLists.txt
src/afb-proto-ws.c [new file with mode: 0644]
src/afb-proto-ws.h [new file with mode: 0644]
src/afb-stub-ws.c
stress-server.sh