Poll McSocket

This commit is contained in:
MarcEricMartel
2023-11-06 13:56:12 -05:00
parent ac9174f793
commit 9b9e2b3f1f
9 changed files with 43 additions and 20 deletions

View File

@@ -2,7 +2,7 @@
#define CONNECTION_H__
#include <deque>
#include <map>
#include <unordered_map>
#include "../SQCSim-common/player.h"
#include "../SQCSim-common/vector3.h"
#include "../SQCSim-common/netprotocol.h"
@@ -34,9 +34,9 @@ public:
void CleanInputManifest(Timestamp time);
private:
std::map<Timestamp, Input> m_input_manifest;
std::map<Timestamp, Output> m_output_manifest;
std::map<Timestamp, Chat> m_chatlog;
std::unordered_map<Timestamp, Input> m_input_manifest;
std::unordered_map<Timestamp, Output> m_output_manifest;
std::unordered_map<Timestamp, Chat> m_chatlog;
SOCKET m_sock;
sockaddr_in m_addr;

View File

@@ -5,6 +5,7 @@
#include <vector>
#include <set>
#include <string>
#include <unordered_map>
#include "../SQCSim-common/world.h"
#include "../SQCSim-common/netprotocol.h"
#include "define.h"
@@ -35,8 +36,8 @@ private:
Buffer m_buf;
std::map<uint64_t, std::unique_ptr<Connection>> m_players;
std::map <Timestamp, Chat> m_chatlog;
std::unordered_map<uint64_t, std::unique_ptr<Connection>> m_players;
std::unordered_map<Timestamp, Chat> m_chatlog;
std::vector<uint64_t> m_ids;
GameInfo m_game;