mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
check I2NP messages fro expiration
This commit is contained in:
parent
eb2d68fc28
commit
9611f80a39
5 changed files with 22 additions and 3 deletions
|
@ -51,6 +51,11 @@ namespace i2p
|
|||
SetExpiration (i2p::util::GetMillisecondsSinceEpoch () + 8000);
|
||||
}
|
||||
|
||||
bool I2NPMessage::IsExpired () const
|
||||
{
|
||||
return i2p::util::GetMillisecondsSinceEpoch () > GetExpiration ();
|
||||
}
|
||||
|
||||
std::shared_ptr<I2NPMessage> CreateI2NPMessage (I2NPMessageType msgType, const uint8_t * buf, size_t len, uint32_t replyMsgID)
|
||||
{
|
||||
auto msg = NewI2NPMessage (len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue