1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
libwebsockets/minimal-examples/http-server/minimal-http-server-eventlib-custom
Andy Green 7baf400017 evlib: allow custom evlib ops
Adapt the event lib support slighly so we can pass an event lib "plugin"
header in at context creation time, and direct all event loop handling to
go via that.

This can then be lightly adapted to interface to an existing custom event
loop cleanly, without the problems of EXTERNAL_POLL.

The external loop must consult with us about the max wait timeout as shown
in the added minimal-http-server-eventlib-custom example.

The example shows a complete implementation working with a custom poll()
loop cleanly while only needing 5 ops in the custom event lib handler.
2021-06-07 08:17:49 +01:00
..
mount-origin evlib: allow custom evlib ops 2021-06-07 08:17:49 +01:00
CMakeLists.txt evlib: allow custom evlib ops 2021-06-07 08:17:49 +01:00
minimal-http-server.c evlib: allow custom evlib ops 2021-06-07 08:17:49 +01:00
README.md evlib: allow custom evlib ops 2021-06-07 08:17:49 +01:00

lws minimal http server

build

 $ cmake . && make

usage

 $ ./lws-minimal-http-server
[2018/03/04 09:30:02:7986] USER: LWS minimal http server | visit http://localhost:7681
[2018/03/04 09:30:02:7986] NOTICE: Creating Vhost 'default' port 7681, 1 protocols, IPv6 on

Visit http://localhost:7681