1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-23 00:00:06 +01:00
libwebsockets/minimal-examples/http-server/minimal-http-server-h2-long-poll
Andy Green ba754c4cb2 h2: unify immortal stream tracking across SSE and ws substreams
It was already correct but add helpers to isolate and deduplicate
processing adding and closing a generically immortal stream.

Change the default 31s h2 network connection timeout to be settable
by .keepalive_timeout if nonzero.

Add a public api allowing a client h2 stream to transition to
half-closed LOCAL (by sending a 0-byte DATA with END_STREAM) and
mark itself as immortal to create a read-only long-poll stream
if the server allows it.

Add a vhost server option flag LWS_SERVER_OPTION_VH_H2_HALF_CLOSED_LONG_POLL
which allows the vhost to treat half-closed remotes as immortal long
poll streams.
2019-09-22 03:08:36 -07:00
..
CMakeLists.txt h2: unify immortal stream tracking across SSE and ws substreams 2019-09-22 03:08:36 -07:00
localhost-100y.cert h2: unify immortal stream tracking across SSE and ws substreams 2019-09-22 03:08:36 -07:00
localhost-100y.key h2: unify immortal stream tracking across SSE and ws substreams 2019-09-22 03:08:36 -07:00
minimal-http-server.c h2: unify immortal stream tracking across SSE and ws substreams 2019-09-22 03:08:36 -07:00
README.md h2: unify immortal stream tracking across SSE and ws substreams 2019-09-22 03:08:36 -07: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