From 3407f97096fd66aeb25f1cd26ba002d3f8a23127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sun, 27 Aug 2023 11:41:41 +0200 Subject: Network: announce protocol version --- src/network/protocol.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/network/protocol.h') diff --git a/src/network/protocol.h b/src/network/protocol.h index 51f8d59..545585e 100644 --- a/src/network/protocol.h +++ b/src/network/protocol.h @@ -32,6 +32,8 @@ public: NetworkProtocol & operator=(NetworkProtocol &&); ~NetworkProtocol(); + static constexpr char defaultVersion[] = "0.1"; + class Connection; struct Header; @@ -111,6 +113,7 @@ struct NetworkProtocol::ConnectionReadReady { Connection::Id id; }; struct NetworkProtocol::Header { struct Acknowledged { Digest value; }; + struct Version { string value; }; struct DataRequest { Digest value; }; struct DataResponse { Digest value; }; struct AnnounceSelf { Digest value; }; @@ -122,6 +125,7 @@ struct NetworkProtocol::Header using Item = variant< Acknowledged, + Version, DataRequest, DataResponse, AnnounceSelf, -- cgit v1.2.3