Skip to content

Commit

Permalink
Add client settings
Browse files Browse the repository at this point in the history
  • Loading branch information
dvsku committed Jun 22, 2024
1 parent c82b34e commit fd399fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/libnetwrk/net/core/client/client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
5 changes: 5 additions & 0 deletions include/libnetwrk/net/core/client/client_context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@
#include <array>

namespace libnetwrk {
struct client_settings {
};

template<typename Connection>
class client_context : public shared_context<Connection> {
public:
using cb_disconnect_t = std::function<void()>;

public:
client_settings settings;

uint8_t clock_drift_samples_received = 0U;
std::array<int32_t, 10> clock_drift_samples = {};

Expand Down

0 comments on commit fd399fc

Please sign in to comment.