13
0
Commit Graph

36 Commits

Author SHA1 Message Date
Luciano Iam
3840264edd
WebSockets: remove usage of lws constant LLL_USER
It is not available on lws 2 and really not needed
2020-05-28 18:56:21 +02:00
Luciano Iam
c3d72625cd
WebSockets: leverage LWS_WITH_GLIB 2020-05-28 18:56:21 +02:00
Luciano Iam
85d1aa30d5
WebSockets: comment out a lws_callback case that made clients hang 2020-05-28 18:56:21 +02:00
Luciano Iam
7554655616
WebSockets: improve libwebsockets 4 compatibility
After upgrading from lws 3 to 4 clients could still connect to the surface but no data was sent from the server.
2020-05-28 18:56:21 +02:00
Luciano Iam
6e5aeb57b3
WebSockets: fix LWS_WITH_EXTERNAL_POLL check 2020-05-28 18:56:20 +02:00
Luciano Iam
c362605b49
WebSockets: add some TO DO comments 2020-04-22 21:59:35 +02:00
Luciano Iam
8b65b0a961
WebSockets: disable http caching if NDEBUG is set
This is useful while developing web surface javascript code
2020-04-22 21:59:35 +02:00
Luciano Iam
ff7b7fe6a7
WebSockets: fix a comment in server.cc 2020-04-22 21:59:34 +02:00
Luciano Iam
cc08a2d945 WebSockets: compatibility fixes for Windows
Escape path strings in surfaces.json
Default to index.html in mount points
2020-04-21 15:53:27 +02:00
Luciano Iam
4f2fdb10a3
WebSockets: send caching headers for static resources 2020-04-20 22:59:16 +02:00
Luciano Iam
137042f80c
WebSockets: rename _lws_mnt_index to _lws_mnt_root
This mount point not only serves the index but everything that is under
/ , including the built-in surfaces directory
2020-04-17 20:15:10 +02:00
Luciano Iam
50ba8dea96
WebSockets: improve JS client and demo
add methods to callback.js
automatically reconnect js client on disconnection
mixer-demo do not recreate UI on reconnection
NO-OP: indentation in message.js
make client JS reconnection optional
fix mixer-demo scrolling
minor JS client refactor
improve mixer-demo readability
2020-04-17 20:15:10 +02:00
Luciano Iam
612c71aa25
WebSockets: allow serving SVG files using libwebsockets < 3 2020-04-17 20:15:10 +02:00
Luciano Iam
30c8563a6d
WebSockets: rename send_index_* to send_availsurf_* to avoid confusion with a static index page 2020-04-13 16:29:38 +02:00
Luciano Iam
e7f22cf989
WebSockets: rename resource index.json to more meaningful surfaces.json 2020-04-13 16:29:38 +02:00
Luciano Iam
420137ea9d
WebSockets: always return -1 from send_index_body() unless there is a write error 2020-04-11 22:30:40 +02:00
Luciano Iam
ed427e5704
WebSockets: add useful comment on lws_write() 2020-04-11 22:30:40 +02:00
Luciano Iam
c477a81a7c
WebSockets: use lws_strncpy() when available 2020-04-11 22:30:40 +02:00
Luciano Iam
731ea79028
WebSockets: fix timeout when sending HTTP body 2020-04-11 22:30:33 +02:00
61692ae1f8
Fix some Wunused-result 2020-04-09 21:26:12 +02:00
Luciano Iam
40520a6dc6
Clean up and prepare for HTTP 2020-04-09 20:56:46 +02:00
1607d6a6c1
Fix websocket to glib IO condition mapping 2020-03-26 16:04:17 +01:00
4eba86b503
Fix libwebsockets compat
LWS_CALLBACK_HTTP_CONFIRM_UPGRADE is only available since v3.1.0
2020-02-27 23:58:00 +01:00
Luciano Iam
ef512d412d
Avoid occasional response delay when handling HTTP in the websockets surface 2020-02-27 03:42:54 +01:00
Luciano Iam
0921cf8939
Make previous commit 81ecc2b compatible with libwebsockets==2 2020-02-27 03:42:54 +01:00
Luciano Iam
ec8e0f8ee5
Gracefully reject HTTP requests reaching the websockets surface 2020-02-27 03:42:54 +01:00
1074c16299
Websockets: error on unhandled callbacks
This prevents unhandled http request from hogging the backend.
2020-02-24 22:06:15 +01:00
bd00db9e8b
Websockets: use established NDEBUG - see assert(3) 2020-02-24 22:06:15 +01:00
5e3480ba8f
NO-OP: Re-indent websockets code
"Always use Tabstops for block-indent (the code must be
formatted correctly with "[TAB] = N spaces" for any value of N).
Use space only for alignment." - https://ardour.org/styleguide.html
2020-02-23 16:21:55 +01:00
7fdc35bb45
Fix Unix compile with older libwebsockets
Debian/Ubuntu still only ship libwebsockets 2.x.
Recent libWS abstracts the poll interface to be
compatible with Windows.
2020-02-22 23:27:08 +01:00
Luciano Iam
d7ef188aea
Prefix events with LWS_ 2020-02-22 23:10:25 +01:00
Luciano Iam
5abce5aae5
Properly initialize IOCondition in events_to_ioc() 2020-02-22 23:10:25 +01:00
Luciano Iam
7f73cfb36e
Properly initialize lws config structs 2020-02-22 23:10:25 +01:00
Luciano Iam
047b05b860
Remove all initializer list usages 2020-02-22 23:10:24 +01:00
Luciano Iam
6e499e2cc5
Make code adhere to C++98 (WIP) 2020-02-22 23:10:24 +01:00
Luciano Iam
8db9755d1e
Add websockets surface module 2020-02-22 23:10:24 +01:00