From 12497ed32f70a23552fd35161138b2e1812fc4f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 16 Nov 2024 20:25:47 +0100 Subject: Network: use streams to send large objects --- src/network.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/network.h') diff --git a/src/network.h b/src/network.h index 8ea8b6c..ed02167 100644 --- a/src/network.h +++ b/src/network.h @@ -143,13 +143,19 @@ public: void header( Header::Item && ); void body( const Ref & ); + void stream( shared_ptr< NetworkProtocol::OutStream >); const vector< Header::Item > & header() const { return mheader; } vector< Object > body() const; + shared_ptr< NetworkProtocol::OutStream > stream() const { return mstream; } + + size_t size() const; private: vector< Header::Item > mheader; vector< Ref > mbody; + size_t bodySize = 0; + shared_ptr< NetworkProtocol::OutStream > mstream; }; struct WaitingRef -- cgit v1.2.3