]> git.kaiwu.me - haproxy.git/commit
MINOR: h2: add a few functions to retrieve contents from a wrapping buffer
authorWilly Tarreau <w@1wt.eu>
Tue, 10 Oct 2017 15:10:03 +0000 (17:10 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 17:12:14 +0000 (18:12 +0100)
commit54c150653dbaf4bee545051427223fbd2e7be46a
tree424e8d59048474bde6f18426af3e639dc550b506
parent715d5316e5f00a5ba7fdffcb5d7365e027a875d1
MINOR: h2: add a few functions to retrieve contents from a wrapping buffer

Functions h2_get_buf_n{16,32,64}() and h2_get_buf_bytes() respectively
extract a network-ordered 16/32/64 bit value from a possibly wrapping
buffer, or any arbitrary size. They're convenient to retrieve a PING
payload or to parse SETTINGS frames. Since they copy one byte at a time,
they will be less efficient than a memcpy-based implementation on large
blocks.
src/mux_h2.c