mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
send batch of I2NP messages
This commit is contained in:
parent
74c89ce06e
commit
ea353ac3ba
8 changed files with 71 additions and 6 deletions
|
@ -617,6 +617,17 @@ namespace transport
|
|||
if (msg)
|
||||
Send (msg);
|
||||
}
|
||||
|
||||
void NTCPSession::SendI2NPMessages (const std::vector<I2NPMessage *>& msgs)
|
||||
{
|
||||
m_Server.GetService ().post (std::bind (&NTCPSession::PostI2NPMessages, shared_from_this (), msgs));
|
||||
}
|
||||
|
||||
void NTCPSession::PostI2NPMessages (std::vector<I2NPMessage *> msgs)
|
||||
{
|
||||
for (auto it: msgs)
|
||||
if (it) Send (it);
|
||||
}
|
||||
|
||||
void NTCPSession::ScheduleTermination ()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue