use I2NPMessagesHandler for SSU

This commit is contained in:
orignal 2015-01-29 22:35:57 -05:00
parent aae837f642
commit 0b911a5caa
2 changed files with 4 additions and 1 deletions

View File

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

View File

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