mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
pass I2NP message to transport session as shared_ptr
This commit is contained in:
parent
d65257c7b0
commit
3a63f6775a
9 changed files with 47 additions and 75 deletions
|
@ -62,19 +62,13 @@ namespace transport
|
|||
std::shared_ptr<const i2p::data::RouterInfo> router;
|
||||
std::list<std::shared_ptr<TransportSession> > sessions;
|
||||
uint64_t creationTime;
|
||||
std::vector<i2p::I2NPMessage *> delayedMessages;
|
||||
std::vector<std::shared_ptr<i2p::I2NPMessage> > delayedMessages;
|
||||
|
||||
void Done ()
|
||||
{
|
||||
for (auto it: sessions)
|
||||
it->Done ();
|
||||
}
|
||||
|
||||
~Peer ()
|
||||
{
|
||||
for (auto it :delayedMessages)
|
||||
i2p::DeleteI2NPMessage (it);
|
||||
}
|
||||
};
|
||||
|
||||
const size_t SESSION_CREATION_TIMEOUT = 10; // in seconds
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue