]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: channel: implement a zero-copy buffer transfer
authorWilly Tarreau <w@1wt.eu>
Mon, 8 Dec 2014 17:14:53 +0000 (18:14 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 24 Dec 2014 22:47:33 +0000 (23:47 +0100)
commitb034b2598ddea1e852df1f1de8672e285c8c2f6b
tree6db3c9f3db352dfaf31cabcce7c2ea48f1b25aae
parent33cb0653480f888e30e9dccd189a7f8b3fd64eb2
MEDIUM: channel: implement a zero-copy buffer transfer

bi_swpbuf() swaps the buffer passed in argument with the one attached to
the channel, but only if this last one is empty. The idea is to avoid a
copy when buffers can simply be swapped.
include/proto/channel.h
src/channel.c