summaryrefslogtreecommitdiff
path: root/src/network.h
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2024-11-16 20:25:47 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2024-11-18 21:06:44 +0100
commit12497ed32f70a23552fd35161138b2e1812fc4f0 (patch)
treea3b2085ceacc56cfd7f553f42244a05bd9141e9d /src/network.h
parent47bd6afb103c5ddfb4a878e95416793610ed1be3 (diff)
Network: use streams to send large objectsdevel
Diffstat (limited to 'src/network.h')
-rw-r--r--src/network.h6
1 files changed, 6 insertions, 0 deletions
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