MINOR: channel: Add functions to get info on buffers and deal with HTX streams
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 17 Nov 2023 10:09:45 +0000 (11:09 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 17 Nov 2023 14:08:15 +0000 (15:08 +0100)
commit020231ea791367c04e5d27bb62af8aff5cedaeaa
treeefcd6e3eb0ce9d62f445a73c7d537ea9b31dbfeb
parent7393bf7e424d4cd2e0927bf4dc95eb799ec67dd4
MINOR: channel: Add functions to get info on buffers and deal with HTX streams

This patch adds HXT-aware versions of the functions c_data(), ci_data() and
c_empty(). channel_data() function returns the amount of data in the
channel, channel_input_data() returns the amount of input data and
channel_empty() returns true if the channel's buffer is empty. These
functions handles HTX buffers.

In addition, channel_data_limit() function, still HTX-aware, can be used to
get the maximum absolute amount of data that can be copied in a buffer,
independently on data already present in the buffer.
include/haproxy/channel.h