send batch of I2NP messages

This commit is contained in:
orignal 2015-01-20 21:05:57 -05:00
parent 74c89ce06e
commit ea353ac3ba
8 changed files with 71 additions and 6 deletions

View file

@ -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 ()
{