From fd399fc3bf5e6d025ebb925cd384a9fb787abc94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Stoj=C5=A1in?= Date: Sat, 22 Jun 2024 08:51:35 +0200 Subject: [PATCH] Add client settings --- include/libnetwrk/net/core/client/client.hpp | 4 ++++ include/libnetwrk/net/core/client/client_context.hpp | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/include/libnetwrk/net/core/client/client.hpp b/include/libnetwrk/net/core/client/client.hpp index c1d5859..83422eb 100644 --- a/include/libnetwrk/net/core/client/client.hpp +++ b/include/libnetwrk/net/core/client/client.hpp @@ -114,6 +114,10 @@ namespace libnetwrk { return m_context.name; } + client_settings& get_settings() { + return m_context.settings; + } + /* Adjust a service timestamp to account for clock drift */ diff --git a/include/libnetwrk/net/core/client/client_context.hpp b/include/libnetwrk/net/core/client/client_context.hpp index 8d122a4..61863b7 100644 --- a/include/libnetwrk/net/core/client/client_context.hpp +++ b/include/libnetwrk/net/core/client/client_context.hpp @@ -5,12 +5,17 @@ #include namespace libnetwrk { + struct client_settings { + }; + template class client_context : public shared_context { public: using cb_disconnect_t = std::function; public: + client_settings settings; + uint8_t clock_drift_samples_received = 0U; std::array clock_drift_samples = {};