1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
libwebsockets/lib
Andy Green 4b7144f763 lws_buflist
For h1 / ws, a combination of removing POLLIN wait and
stashing any unused rx lets us immediately respond to
rx flow control requests in a simple and effective way,
because the tcp socket is the stream.

But for muxed protocols like h2, that technique cannot
be used because we cannot silence the whole bundle of
streams because one can't handle any more rx dynamically.

There are control frames and content for other streams
serialized inbetween the flow controlled stream content.
We have no choice but to read to so we can see the other
things.  Therefore for muxed protocols like h2 and spdy,
rx flow control boils down to tx credit manipulation
on individual streams to staunch the flow at the peer.

However that requires a round trip to take effect, any
transmitted packets that were in flight before the tx credit
reduction arrives at the remote peer are still going to come
and have to be dealt with by adding them to the stash.

This patch introduces lws_buflist scatter-gather type
buffer management for rxflow handling, so we can append
buffer segments in a linked-list to handle whatever rx
is unavoidably in flight on a stream that is trying to
assert rx flow control.
2018-04-19 16:15:10 +08:00
..
event-libs refactor role ops 2018-04-11 13:39:42 +08:00
jws lws_snprintf 2018-03-12 09:28:42 +08:00
misc refactor role ops 2018-04-11 13:39:42 +08:00
plat pipe2 where possible 2018-04-19 16:15:10 +08:00
roles lws_buflist 2018-04-19 16:15:10 +08:00
tls alpn: assemble defaults from roles and allow override 2018-04-19 16:15:10 +08:00
alloc.c acme: adaptations through plat for esp32 2017-12-11 13:30:12 +08:00
context.c lws_buflist 2018-04-19 16:15:10 +08:00
libwebsockets.c lws_buflist 2018-04-19 16:15:10 +08:00
libwebsockets.h lws_buflist 2018-04-19 16:15:10 +08:00
output.c 404 processing 2018-04-19 16:15:10 +08:00
pollfd.c lws_buflist 2018-04-19 16:15:10 +08:00
private-libwebsockets.h lws_buflist 2018-04-19 16:15:10 +08:00
service.c lws_buflist 2018-04-19 16:15:10 +08:00