Browse Source

use I2NPMessagesHandler for SSU

pull/151/head
orignal 10 years ago
parent
commit
0b911a5caa
  1. 4
      SSUData.cpp
  2. 1
      SSUData.h

4
SSUData.cpp

@ -235,7 +235,7 @@ namespace transport @@ -235,7 +235,7 @@ namespace transport
{
if (m_ReceivedMessages.size () > 100) m_ReceivedMessages.clear ();
m_ReceivedMessages.insert (msgID);
i2p::HandleI2NPMessage (msg);
m_Handler.PutNextMessage (msg);
}
else
{
@ -260,6 +260,8 @@ namespace transport @@ -260,6 +260,8 @@ namespace transport
SendFragmentAck (msgID, fragmentNum);
buf += fragmentSize;
}
if (numFragments > 0)
m_Handler.Flush ();
}
void SSUData::ProcessMessage (uint8_t * buf, size_t len)

1
SSUData.h

@ -106,6 +106,7 @@ namespace transport @@ -106,6 +106,7 @@ namespace transport
std::set<uint32_t> m_ReceivedMessages;
boost::asio::deadline_timer m_ResendTimer;
int m_MaxPacketSize, m_PacketSize;
i2p::I2NPMessagesHandler m_Handler;
};
}
}

Loading…
Cancel
Save