add StateMachine

This commit is contained in:
2025-08-09 11:23:17 +02:00
parent ac3e949323
commit cba790f804
23 changed files with 174 additions and 244 deletions

View File

@@ -0,0 +1,16 @@
#include <client/ClientState.h>
#include <client/Client.h>
namespace td {
namespace client {
ClientState::ClientState(Client& a_Client) : Client::State(a_Client) {
Connect(m_StateMachine.m_Socket->OnReceive, std::bind(&ClientState::HandlePacket, this, std::placeholders::_1));
}
void ClientState::SendPacket(const protocol::PacketBase& a_Packet) {
m_StateMachine.m_Socket->Send(a_Packet);
}
} // namespace server
} // namespace td