summaryrefslogtreecommitdiffstats
path: root/src/afb-proto-ws.c
AgeCommit message (Collapse)AuthorFilesLines
2019-02-06Update copyright datehalibut_7.90.0halibut/7.90.07.90.0José Bollo1-1/+1
Change-Id: I3aaa92b2bfb01699ee8ae609272e93032b6f1a9d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-01-16afb-proto-ws: Serialize incoming messageJosé Bollo1-4/+3
Enforce serialisation for a connection Bug-AGL: SPEC-2089 Change-Id: Id9f261b7cc02fda78922dc511856c34b7c5bf56d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-12-05afb-proto-ws: Add error reportJose Bollo1-0/+13
Change-Id: I58c88f8bcaf4cfb8a53b58eeefd7fa3415bf894a Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-08-23afb-stub-ws: Safe handling of deconnectionsJose Bollo1-1/+1
This commit also include many comments and improvements in naming of functions. Bug-AGL: SPEC-1668 Change-Id: I1b5dd95678d94e9edfca1c598c5697e90bb9e5bf Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-08-23Send error replies on disconnectionJose Bollo1-2/+12
The pending calls receive an error notification when the server hang up. Bug-AGL: SPEC-1668 Change-Id: I052dca5e338a7650d7630856e21f1d3a81c6f265 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-08-02Improve parsing of json stringJose Bollo1-2/+3
Change-Id: I7100961ef8f8a75d623a0667178f191dd4cfb9d3 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-07-06Simplify build by introducing queuing functionJosé Bollo1-36/+37
It is not valuable at the end to continue to have this fake job implementation. So removing it is good. Change-Id: I930ade3e3a511f0ebfb91292e5725ac3be884d44 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-05Remove uses of deprecated macrosJosé Bollo1-2/+0
Change-Id: I439e891d92fb34087755e68102fda97c43b5b786 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-15api-v3: First draftJosé Bollo1-258/+48
This commit introduces the bindings v3 API for bindings. The documentation has still to be improved and will come very soon. Change-Id: I8f9007370e29f671fdfd1da87fff7372a17db7af Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-27Update date of copyright noticesJosé Bollo1-1/+1
Change-Id: If9d7e7728df086fbb7214f1de5cbec35cd2f1d9b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-22fdev: Introduce fdev for file event handlingJosé Bollo1-13/+14
This is an effort to keep cutting dependency to systemd. Change-Id: I9a0c032a1095e297c7f3ac5b67827fda3658b8d9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-17afb-proto-ws: Fix autolock in proto-wsJosé Bollo1-48/+94
Because a systemd event loop can not be reentered while evaluating an event callback, the event loop was removed from the threads. It had the effect to enter in deadlock when calling a synchronous call while in an event callback. Queueing a job solves the issue. But because using queued job has implications on libafbws, a fake job manager is added for libafbws. Change-Id: Id793bea55743790082eaab48cd4cc87f7993772a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-11afb-proto-ws: fix self locking issueJosé Bollo1-29/+82
Calling synchronously a verb on an event of the same API was blocking. Change-Id: I58a988c6df8c60cd3a38c3cdff23d7be8b6be54e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-03afb-proto-ws: Fix unclosed file descriptorJosé Bollo1-0/+1
Change-Id: I3c831b4f803e283fc692fef66621a798a5e9296e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-11afb-proto-ws: remove dependenciesJosé Bollo1-17/+6
Remove dependencies to verbose and to afb-common. Change-Id: I140f2cd7c159e9be994ab7b786a164d605d1b1dc Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Remove tailing spaces and TODO fileJosé Bollo1-1/+1
Change-Id: Id7cdad4e24c6ab62bf9c325b542e1605b17223f4 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-09-12afb-proto-ws: Split afb-stub-ws in twoeel_4.99.1eel/4.99.14.99.1José Bollo1-0/+1171
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>