1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
libwebsockets/test-apps
Andy Green 1820212724 lws_set_timer_usecs: change to usec resolution
This replaces the existing, unreleased lws_set_timer(wsi, secs) with
lws_set_timer_usecs(wsi, usecs).

wsi with a timer waiting are added to a linked-list sorted by the
timer trigger time.

1) poll() timeout (ie, poll wait) is trimmed to the nearest ms of the
first waiting timer if the default poll wait is longer than the
interval until the first waiting timer.

The linked-list of waiting timers is checked every entry and exit
from poll()... if no timers waiting or none reached their time
this costs almost nothing.

2) libuv: the earliest hrtimer is checked after every IO, again this
is costing nothing if the list head is NULL.  If the case there
are hrtimers on the list, it costs a getimeofday (a VDSO in linux)
and more only if any of the timers have fired.

In addition on entry to libuv idle, if there are any waiting hrtimers
on the list, a libuv timer is used to force a wake in case we stay
idle (the libuv timer has ms resolution).

3) libev: not implemented

4) libevent: not implemented

Warnings are logged in the api is used on an event backend without
support.  Patches welcome to add support similarly to libuv.
2018-04-06 10:38:03 +08:00
..
android align private LWS_NO_EXTENSIONS to be same as public LWS_WITHOUT_EXTENSIONS 2018-04-06 10:38:03 +08:00
private clean up top level of project 2017-09-27 08:24:05 +08:00
.gitignore clean up top level of project 2017-09-27 08:24:05 +08:00
attack.sh attack.sh fixes 2018-01-14 11:32:45 +08:00
candide.zip clean up top level of project 2017-09-27 08:24:05 +08:00
favicon.ico clean up top level of project 2017-09-27 08:24:05 +08:00
fuzxy.c lws_snprintf 2018-03-12 09:28:42 +08:00
http2.png wss-over-h2: show feedback in test page if active 2018-04-06 10:38:03 +08:00
leaf.jpg clean up top level of project 2017-09-27 08:24:05 +08:00
libwebsockets-test-server.service clean up top level of project 2017-09-27 08:24:05 +08:00
libwebsockets.org-logo.png clean up top level of project 2017-09-27 08:24:05 +08:00
lws-cgi-test.sh http2: make usable 2017-10-16 17:13:49 +08:00
lws-common.js http2: make usable 2017-10-16 17:13:49 +08:00
lws-ssh-test-keys Plugins: add ssh-base ssh server plugin 2017-10-16 16:59:57 +08:00
lws-ssh-test-keys.pub Plugins: add ssh-base ssh server plugin 2017-10-16 16:59:57 +08:00
test-client.c lws_snprintf 2018-03-12 09:28:42 +08:00
test-echo.c align private LWS_NO_EXTENSIONS to be same as public LWS_WITHOUT_EXTENSIONS 2018-04-06 10:38:03 +08:00
test-fraggle.c lws_snprintf 2018-03-12 09:28:42 +08:00
test-lejp.c lejp: fix float 2018-01-04 10:28:06 +08:00
test-ping.c lws_snprintf 2018-03-12 09:28:42 +08:00
test-server-dumb-increment.c lws_set_timer_usecs: change to usec resolution 2018-04-06 10:38:03 +08:00
test-server-http.c lws_snprintf 2018-03-12 09:28:42 +08:00
test-server-libev.c lws_snprintf 2018-03-12 09:28:42 +08:00
test-server-libevent.c lws_snprintf 2018-03-12 09:28:42 +08:00
test-server-libuv.c wss-over-h2: show feedback in test page if active 2018-04-06 10:38:03 +08:00
test-server-pthreads.c lws_snprintf 2018-03-12 09:28:42 +08:00
test-server-v2.0.c lws_snprintf 2018-03-12 09:28:42 +08:00
test-server.c unixskt: add test server support and cleanup inode on exit 2018-04-06 10:38:03 +08:00
test-server.h mingw: fixes 2017-12-01 11:37:33 +08:00
test-sshd.c win32: remove snprintf mangling 2018-03-09 08:49:59 +08:00
test.html wss-over-h2: show feedback in test page if active 2018-04-06 10:38:03 +08:00
wss-over-h2.png wss-over-h2: show feedback in test page if active 2018-04-06 10:38:03 +08:00