diff --git a/src/core/client.h b/src/core/client.h index 157698d..131df46 100644 --- a/src/core/client.h +++ b/src/core/client.h @@ -10,10 +10,10 @@ #include #include #include -#include #include #include #include +#include namespace Candy { @@ -148,7 +148,7 @@ class Client { StunCache stun; PeerInfo selfInfo; std::shared_mutex ipPeerMutex; - std::map ipPeerMap; + std::unordered_map ipPeerMap; std::thread udpThread; std::thread tickThread; uint64_t tickTick = randomUint32(); @@ -170,7 +170,7 @@ class Client { std::shared_mutex sysRtTableMutex; std::list sysRtTable; std::shared_mutex candyRtTableMutex; - std::map candyRtTable; + std::unordered_map candyRtTable; int32_t routeCost; }; diff --git a/src/core/server.h b/src/core/server.h index 6028f4f..2696c50 100644 --- a/src/core/server.h +++ b/src/core/server.h @@ -8,6 +8,7 @@ #include #include #include +#include namespace Candy { @@ -52,7 +53,7 @@ class Server { Address dynamic; bool dynamicAddrEnabled = false; - std::map ipWsMap; + std::unordered_map ipWsMap; std::map wsIpMap; std::map wsMacMap; std::list routes;