the amount of data drained.
- htx_xfer_blks() transfers HTX blocks from an HTX message to another,
- stopping on the first block of a specified type or when a specific amount
- of bytes, including meta-data, was moved. If the tail block is a DATA
- block, it may be partially moved. All other block are transferred at once
- or kept. This function returns a mixed value, with the last block moved,
- or NULL if nothing was moved, and the amount of data transferred. When
- HEADERS or TRAILERS blocks must be transferred, this function transfers
- all of them. Otherwise, if it is not possible, it triggers an error. It is
- the caller responsibility to transfer all headers or trailers at once.
+ stopping after the first block of a specified type is transferred or when
+ a specific amount of bytes, including meta-data, was moved. If the tail
+ block is a DATA block, it may be partially moved. All other block are
+ transferred at once or kept. This function returns a mixed value, with the
+ last block moved, or NULL if nothing was moved, and the amount of data
+ transferred. When HEADERS or TRAILERS blocks must be transferred, this
+ function transfers all of them. Otherwise, if it is not possible, it
+ triggers an error. It is the caller responsibility to transfer all headers
+ or trailers at once.
- htx_append_msg() append an HTX message to another one. All the message is
copied or nothing. So, if an error occurred, a rollback is performed. This
return blk;
}
-/* Transfer HTX blocks from <src> to <dst>, stopping on the first block of the
- * type <mark> (typically EOH or EOT) or when <count> bytes were moved
- * (including payload and meta-data). It returns the number of bytes moved and
- * the last HTX block inserted in <dst>.
+/* Transfer HTX blocks from <src> to <dst>, stopping once the first block of the
+ * type <mark> is transferred (typically EOH or EOT) or when <count> bytes were
+ * moved (including payload and meta-data). It returns the number of bytes moved
+ * and the last HTX block inserted in <dst>.
*/
struct htx_ret htx_xfer_blks(struct htx *dst, struct htx *src, uint32_t count,
enum htx_blk_type mark)