diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2020-01-05 15:33:55 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2020-01-05 15:38:11 +0100 |
commit | 94f4127f71d0358424bbaba3e849c761903a75a1 (patch) | |
tree | 010b2cab97b46a79fd63c6790c554ff1b5d5d3aa /src/network.h | |
parent | 2059c09154870d704d26d10f0462db1e9b4ea676 (diff) |
Temporary and partial storage for network peers
Diffstat (limited to 'src/network.h')
-rw-r--r-- | src/network.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/network.h b/src/network.h index ad29496..af202f6 100644 --- a/src/network.h +++ b/src/network.h @@ -28,6 +28,9 @@ struct Peer const int sock; const sockaddr_in addr; + Storage tempStorage; + PartialStorage partStorage; + void send(const struct TransportHeader &, const vector<Object> &); }; @@ -47,14 +50,13 @@ struct TransportHeader struct Item { const Type type; - const variant<Ref, string> value; + const variant<PartialRef, string> value; }; TransportHeader(const vector<Item> & items): items(items) {} - static optional<TransportHeader> load(const Ref &); - static optional<TransportHeader> load(const Object &); - Object toObject() const; - Ref store(const Storage & st) const; + static optional<TransportHeader> load(const PartialRef &); + static optional<TransportHeader> load(const PartialObject &); + PartialObject toObject() const; const vector<Item> items; }; |