Browse Source

use unordered_map for incomplete messages

pull/1677/head
orignal 4 years ago
parent
commit
3c07665479
  1. 5
      libi2pd/TunnelEndpoint.h

5
libi2pd/TunnelEndpoint.h

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2020, The PurpleI2P Project
* Copyright (c) 2013-2021, The PurpleI2P Project
*
* This file is part of Purple i2pd project and licensed under BSD3
*
@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
#include <inttypes.h>
#include <map>
#include <unordered_map>
#include <string>
#include "I2NPProtocol.h"
#include "TunnelBase.h"
@ -54,7 +55,7 @@ namespace tunnel @@ -54,7 +55,7 @@ namespace tunnel
private:
std::map<uint32_t, TunnelMessageBlockEx> m_IncompleteMessages;
std::unordered_map<uint32_t, TunnelMessageBlockEx> m_IncompleteMessages;
std::map<std::pair<uint32_t, uint8_t>, Fragment> m_OutOfSequenceFragments; // (msgID, fragment#)->fragment
bool m_IsInbound;
size_t m_NumReceivedBytes;

Loading…
Cancel
Save