]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: mux-quic: refactor streams opening
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 4 Jul 2022 13:50:33 +0000 (15:50 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 5 Jul 2022 14:18:27 +0000 (16:18 +0200)
commita509ffb505bf2f81c2963312c6bcd0b6f2cf28a6
treefd8161e6b7886c928c17e6c03d7e94858123b966
parent3abeb579093c5c9c40b5e95d1ff77a11738fed30
MEDIUM: mux-quic: refactor streams opening

Review the whole API used to access/instantiate qcs.

A public function qcc_open_stream_local() is available to the
application protocol layer. It allows to easily opening a local stream.
The ID is automatically attributed to the next one available.

For remote streams, qcc_open_stream_remote() has been implemented. It
will automatically take care of allocating streams in a linear way
according to the ID. This function is called via qcc_get_qcs() which can
be used for each qcc_recv*() operations. For the moment, it is only used
for STREAM frames via qcc_recv(), but soon it will be implemented for
other frames types which can also be used to open a new stream.

qcs_new() and qcs_free() has been restricted to the MUX QUIC only as
they are now reserved for internal usage.

This change is a pure refactoring and should not have any noticeable
impact. It clarifies the developer intent and help to ensure that a
stream is not automatically opened when not desired.
include/haproxy/mux_quic-t.h
include/haproxy/mux_quic.h
src/h3.c
src/mux_quic.c