From 1e374ab639af7afbdffd3be3be22be4ba21858e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sun, 17 Sep 2023 19:27:34 +0200 Subject: Network: acknowledgment using packet counter --- src/network/protocol.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/network/protocol.h') diff --git a/src/network/protocol.h b/src/network/protocol.h index 3d7c073..ba40744 100644 --- a/src/network/protocol.h +++ b/src/network/protocol.h @@ -116,7 +116,7 @@ public: private: static optional
parsePacket(vector & buf, Channel * channel, const PartialStorage & st, - bool & secure); + optional & secure); unique_ptr p; }; @@ -128,6 +128,7 @@ struct NetworkProtocol::ConnectionReadReady { Connection::Id id; }; struct NetworkProtocol::Header { struct Acknowledged { Digest value; }; + struct AcknowledgedSingle { uint64_t value; }; struct Version { string value; }; struct Initiation { Digest value; }; struct CookieSet { Cookie value; }; @@ -143,6 +144,7 @@ struct NetworkProtocol::Header using Item = variant< Acknowledged, + AcknowledgedSingle, Version, Initiation, CookieSet, @@ -162,6 +164,7 @@ struct NetworkProtocol::Header PartialObject toObject(const PartialStorage &) const; template const T * lookupFirst() const; + bool isAcknowledged() const; vector items; }; -- cgit v1.2.3