]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: h2: dynamically allocate the demux buffer on Rx
authorWilly Tarreau <w@1wt.eu>
Fri, 22 Sep 2017 07:13:49 +0000 (09:13 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 17:12:14 +0000 (18:12 +0100)
commit35dbd5d719167fd73a486cdafd571d9efabc64cd
tree176f30fcc9de2b8f1cd75b55b340cd8116756cd7
parenta2af51291f5ee297bc4eb04f4c6efa440b2d4a36
MEDIUM: h2: dynamically allocate the demux buffer on Rx

This patch implements a very basic Rx buffer management. The mux needs
an rx buffer to decode the connection's stream. If this buffer it
available upon Rx events, we fill it with whatever input data are
available. Otherwise we try to allocate it and subscribe to the buffer
wait queue in case of failure. In such a situation, a function
"h2_dbuf_available()" will be called once a buffer may be allocated.
The buffer is released if it's still empty after recv().
src/mux_h2.c