i2pd/TunnelEndpoint.h

41 lines
725 B
C
Raw Normal View History

2013-11-11 03:19:49 +04:00
#ifndef TUNNEL_ENDPOINT_H__
#define TUNNEL_ENDPOINT_H__
#include <inttypes.h>
#include <map>
#include <string>
#include "I2NPProtocol.h"
#include "TunnelBase.h"
namespace i2p
{
namespace tunnel
{
class TunnelEndpoint
{
public:
2013-12-10 17:10:49 +04:00
TunnelEndpoint (): m_NumReceivedBytes (0) {};
size_t GetNumReceivedBytes () const { return m_NumReceivedBytes; };
2013-11-11 03:19:49 +04:00
void HandleDecryptedTunnelDataMsg (I2NPMessage * msg);
private:
void HandleNextMessage (const TunnelMessageBlock& msg);
private:
2014-06-11 18:56:20 +04:00
struct TunnelMessageBlockEx: public TunnelMessageBlock
{
uint8_t nextFragmentNum;
};
std::map<uint32_t, TunnelMessageBlockEx> m_IncompleteMessages;
2013-12-10 17:10:49 +04:00
size_t m_NumReceivedBytes;
2013-11-11 03:19:49 +04:00
};
}
}
#endif