add client

This commit is contained in:
2025-08-08 13:24:50 +02:00
parent b09c7f9efd
commit ac3e949323
14 changed files with 306 additions and 33 deletions

30
include/client/Client.h Normal file
View File

@@ -0,0 +1,30 @@
#pragma once
#include <client/IClientSocket.h>
#include <client/IClientState.h>
#include <chrono>
namespace td {
namespace client {
class Client {
private:
std::shared_ptr<IClientSocket> m_Socket;
std::shared_ptr<IClientState> m_State;
std::chrono::time_point<std::chrono::system_clock> m_LastTime;
public:
Client(const std::shared_ptr<IClientSocket>& a_Socket) : m_Socket(a_Socket), m_LastTime(std::chrono::system_clock::now()) {}
void Update();
void UpdateState(const std::shared_ptr<IClientState>& a_State);
private:
void Update(float a_Delta);
friend class IClientState;
};
} // namespace client
} // namespace td