summaryrefslogtreecommitdiffstats
path: root/src/connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/connection.cpp')
-rw-r--r--src/connection.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/connection.cpp b/src/connection.cpp
index fad710a..3aaa236 100644
--- a/src/connection.cpp
+++ b/src/connection.cpp
@@ -48,4 +48,14 @@ void Connection::set_proxy(const string_view proxy)
_instance.set_proxy(proxy);
}
+string Connection::get_new_stream_contents()
+{
+ buffer_mutex.lock();
+ auto &buffer{get_buffer()};
+ auto buffer_copy{buffer};
+ buffer.clear();
+ buffer_mutex.unlock();
+ return buffer_copy;
+}
+
} // namespace mastodonpp