cleanup unclaimed out-of-sequence fragments

This commit is contained in:
orignal 2016-11-09 14:51:55 -05:00
parent b83e7e6c5c
commit 46f927fc1b
5 changed files with 44 additions and 24 deletions

View file

@ -20,9 +20,9 @@ namespace tunnel
struct Fragment
{
uint8_t fragmentNum;
bool isLastFragment;
std::shared_ptr<I2NPMessage> data;
uint64_t receiveTime; // milliseconds since epoch
};
public:
@ -30,7 +30,8 @@ namespace tunnel
TunnelEndpoint (bool isInbound): m_IsInbound (isInbound), m_NumReceivedBytes (0) {};
~TunnelEndpoint ();
size_t GetNumReceivedBytes () const { return m_NumReceivedBytes; };
void Cleanup ();
void HandleDecryptedTunnelDataMsg (std::shared_ptr<I2NPMessage> msg);
private: