From a7a0f69c6bf32b63c3314a097929c533296b1c86 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 8 Aug 2016 15:04:17 +0200 Subject: Add StreamSocket::SendQueue::moveall() for moving data between sendqs --- include/inspsocket.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/inspsocket.h b/include/inspsocket.h index 77d79bd95..751374fdf 100644 --- a/include/inspsocket.h +++ b/include/inspsocket.h @@ -198,6 +198,13 @@ class CoreExport StreamSocket : public EventHandler nbytes = 0; } + void moveall(SendQueue& other) + { + nbytes += other.bytes(); + data.insert(data.end(), other.data.begin(), other.data.end()); + other.clear(); + } + private: /** Private send queue. Note that individual strings may be shared. */ -- cgit v1.2.3