mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
transit tunnel gateway batching
This commit is contained in:
parent
82103e6a39
commit
1dc166f0f8
4 changed files with 25 additions and 9 deletions
|
@ -560,13 +560,17 @@ namespace i2p
|
|||
{
|
||||
if (msg)
|
||||
{
|
||||
if (msg->GetTypeID () == eI2NPTunnelData)
|
||||
{
|
||||
LogPrint ("TunnelData");
|
||||
m_TunnelMsgs.push_back (msg);
|
||||
}
|
||||
else
|
||||
HandleI2NPMessage (msg);
|
||||
switch (msg->GetTypeID ())
|
||||
{
|
||||
case eI2NPTunnelData:
|
||||
LogPrint ("TunnelData");
|
||||
m_TunnelMsgs.push_back (msg);
|
||||
break;
|
||||
LogPrint ("TunnelGateway");
|
||||
m_TunnelGatewayMsgs.push_back (msg);
|
||||
default:
|
||||
HandleI2NPMessage (msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -577,5 +581,10 @@ namespace i2p
|
|||
i2p::tunnel::tunnels.PostTunnelData (m_TunnelMsgs);
|
||||
m_TunnelMsgs.clear ();
|
||||
}
|
||||
if (!m_TunnelGatewayMsgs.empty ())
|
||||
{
|
||||
i2p::tunnel::tunnels.PostTunnelData (m_TunnelMsgs);
|
||||
m_TunnelGatewayMsgs.clear ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue