à tester

This commit is contained in:
MarcEricMartel
2023-10-25 12:16:14 -04:00
parent dd2396e5e4
commit 9b4defba2a
6 changed files with 56 additions and 46 deletions

View File

@@ -8,13 +8,15 @@
#include "../SQCSim-common/netprotocol.h"
#include "define.h"
using namespace netprot;
class Connection {
public:
Connection(
SOCKET sock,
sockaddr_in sockaddr,
netprot::LoginInfo log,
netprot::PlayerInfo play);
LoginInfo log,
PlayerInfo play);
~Connection();
Player* player = nullptr;
@@ -23,20 +25,22 @@ public:
uint64_t GetTeamHash() const;
std::string GetName() const;
void AddInput(netprot::Input in);
netprot::Output* getOutput(Timestamp time);
netprot::Sync getSync(Timestamp time);
void AddInput(Input in);
Output* getOutput(Timestamp time);
Sync getSync(Timestamp time);
SOCKET getSock() const;
PlayerInfo* getInfo() const;
void CleanInputManifest(Timestamp time);
private:
std::map<Timestamp, netprot::Input> m_input_manifest;
std::map<Timestamp, netprot::Output> m_output_manifest;
std::map<Timestamp, netprot::Chat> m_chatlog;
std::map<Timestamp, Input> m_input_manifest;
std::map<Timestamp, Output> m_output_manifest;
std::map<Timestamp, Chat> m_chatlog;
SOCKET m_sock;
sockaddr_in m_addr;
netprot::LoginInfo m_loginfo;
netprot::PlayerInfo m_playinfo;
LoginInfo m_loginfo;
PlayerInfo m_playinfo;
};
#endif