mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
SSU data receive batching
This commit is contained in:
parent
e901307d8d
commit
e3190a4ca9
5 changed files with 21 additions and 3 deletions
2
SSU.cpp
2
SSU.cpp
|
@ -218,6 +218,7 @@ namespace transport
|
|||
auto packet = it1;
|
||||
if (!session || session->GetRemoteEndpoint () != packet->from) // we received packet for other session than previous
|
||||
{
|
||||
if (session) session->FlushData ();
|
||||
auto it = m_Sessions.find (packet->from);
|
||||
if (it != m_Sessions.end ())
|
||||
session = it->second;
|
||||
|
@ -235,6 +236,7 @@ namespace transport
|
|||
session->ProcessNextMessage (packet->buf, packet->len, packet->from);
|
||||
delete packet;
|
||||
}
|
||||
if (session) session->FlushData ();
|
||||
}
|
||||
|
||||
std::shared_ptr<SSUSession> SSUServer::FindSession (std::shared_ptr<const i2p::data::RouterInfo> router) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue