From 0eea9ddc7cfb2820295dd87aed3dc911a100ecde Mon Sep 17 00:00:00 2001 From: Determinant Date: Wed, 12 Sep 2018 10:32:51 -0400 Subject: no need to cut the segs for the send_buffer --- include/salticidae/conn.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/salticidae/conn.h b/include/salticidae/conn.h index 53d51a3..f290e3d 100644 --- a/include/salticidae/conn.h +++ b/include/salticidae/conn.h @@ -114,6 +114,12 @@ class SegBuffer { _size += data.size(); buffer.push_back(buffer_entry_t(std::move(data))); } + + bytearray_t move_pop() { + auto res = std::move(buffer.front().data); + buffer.pop_front(); + return std::move(res); + } bytearray_t pop(size_t len) { bytearray_t res; -- cgit v1.2.3-70-g09d2