delete expired LeaseSets

This commit is contained in:
orignal 2014-07-31 12:59:43 -04:00
parent 0a5d4741af
commit acd21a04ae
4 changed files with 57 additions and 19 deletions

View file

@ -49,7 +49,7 @@ namespace data
{
public:
LeaseSet (const uint8_t * buf, int len);
LeaseSet (const uint8_t * buf, int len, bool unsolicited = false);
LeaseSet (const LeaseSet& ) = default;
LeaseSet (const i2p::tunnel::TunnelPool& pool);
LeaseSet& operator=(const LeaseSet& ) = default;
@ -58,6 +58,9 @@ namespace data
const uint8_t * GetBuffer () const { return m_Buffer; };
size_t GetBufferLen () const { return m_BufferLen; };
bool IsUnsolicited () const { return m_IsUnsolicited; };
void SetUnsolicited (bool unsolicited) { m_IsUnsolicited = unsolicited; };
// implements RoutingDestination
const Identity& GetIdentity () const { return m_Identity; };
const IdentHash& GetIdentHash () const { return m_IdentHash; };
@ -80,6 +83,7 @@ namespace data
uint8_t m_EncryptionKey[256];
uint8_t m_Buffer[MAX_LS_BUFFER_SIZE];
size_t m_BufferLen;
bool m_IsUnsolicited;
};
}
}