aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-wsj1.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>
2018-08-23Send error replies on disconnectionJose Bollo1-0/+27
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-23afb-wsj1: Split 'wsj1_on_text' in 2José Bollo1-23/+50
This improves the code and also prepare answering diconnected on server hangup. Bug-AGL: SPEC-1668 Change-Id: I2cf5a75bc2db6e9a0fd0cab88c7ff3cb9fd06242 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-08-02Improve parsing of json stringJose Bollo1-4/+4
Change-Id: I7100961ef8f8a75d623a0667178f191dd4cfb9d3 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-07-24json-c: Remove escaping of slashsJosé Bollo1-3/+6
By default json-c escapes the slashes. This is almost ugly and unuseful. But the resolution (with JSON_C_TO_STRING_NOSLASHESCAPE) was introduced lately by json-c. Integrate it as much as possible. Change-Id: Ia9c4bee78dc11df1ee9640cb04311991bd860e43 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-13afb-wsj1: Fix json parsing of unterminatedJosé Bollo1-0/+2
When receiving 'false', 'true' or 1, the tokener isn't able to terminate its job without ambiguity. Catch this case to force a terminating character. Change-Id: I5c78f759852060ccf0fac87b3f6fc33a65bf30c9 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-5/+5
This is an effort to keep cutting dependency to systemd. Change-Id: I9a0c032a1095e297c7f3ac5b67827fda3658b8d9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-21fix bug on incoming eventJosé Bollo1-1/+5
Change-Id: I7678412374565fd5802b0312e5808e2645df3728 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-06Make websocket concurrentJosé Bollo1-7/+31
Stress tests shown that the module wsj1 wasn't ready to concurrency. Change-Id: Ia54196f97e9712adf0920b59b188d570f39a6b4f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-01-03Adds 2017 to copyrightsJosé Bollo1-1/+1
Change-Id: Id85c4eb4e36a05b61346004ba95daa19faf5074f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-07-27Expose use of the event loopJosé Bollo1-2/+2
The use of the event loop where previously hidden in internal deep places of the websocket modules. This commits enforce the client of the library to explicitely tell what event loop must be used. This has 3 effects: - you know that the systemd event loop is used - you tell the event loop to use (no confusion) - you don't depend on afb-common.c Change-Id: Id13d8a96f981183c299cde414d9bb0cd77fe3daa Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-06-08Websocket: improves overall integrationJosé Bollo1-3/+16
Change-Id: I7af7b96d2f32b706eb378747c3719fa48f68c961 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-06-08wsj1: minor API refactoringJosé Bollo1-15/+5
Change-Id: I55e597a7c7cea295993326a6c4b362a136c05e4e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-05-29compact formatting of jsonJosé Bollo1-6/+6
Change-Id: Ieb839f287593240aac4d784483ff4c6e6cb57d84 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-05-17avoid a warningJosé Bollo1-1/+1
Change-Id: I7a571d13670f689d8a872b2583a5ac06374d0b1a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-05-13cleaning copyrightsJosé Bollo1-1/+1
Change-Id: I4ff7349b1a87f92a7d9f378c715054061f06df57 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-05-13example of integration with websocket in CJosé Bollo1-87/+9
The file src/afb-client-demo.c provides an example of how to make a simple C client that connects to the daemon using the websocket protocol x-afb-json1. Change-Id: I31c926b2c42101a53e1ea36b4f67f095614db4a0 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2016-05-12websocket client libraryJosé Bollo1-0/+578
This introduce 2 files for creating client of websockets x-afb-json1: - afb-wsj1.c - afb-ws-client.c The file afb-wsj1.c implements the protocol x-afb-json1 on top of afb-ws.c. It could be used to rewrite afb-ws-json1. The file afb-ws-client.c implements a light version of the websocket handshaking to open a afb-wsj1 based on an uri. Change-Id: Ie53a3b4ff91a9efac32b667b57f8005266db6001 Signed-off-by: José Bollo <jose.bollo@iot.bzh>