summaryrefslogtreecommitdiff
path: root/include/inspsocket.h
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-08-08 15:04:17 +0200
committerAttila Molnar <attilamolnar@hush.com>2016-08-08 15:04:17 +0200
commita7a0f69c6bf32b63c3314a097929c533296b1c86 (patch)
tree22fc6400da1946d74232a4c8dbf76eebf2e2337d /include/inspsocket.h
parent87602cd04017c0311ca816a6aff7a2475a4ac65c (diff)
Add StreamSocket::SendQueue::moveall() for moving data between sendqs
Diffstat (limited to 'include/inspsocket.h')
-rw-r--r--include/inspsocket.h7
1 files changed, 7 insertions, 0 deletions
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.
*/