handle I2NP message per destination

This commit is contained in:
orignal 2014-10-11 21:27:55 -04:00
parent 6d6c81bf8b
commit 202109ebeb
8 changed files with 28 additions and 14 deletions

View file

@ -271,6 +271,19 @@ namespace stream
m_Service.post (boost::bind (&StreamingDestination::HandleDeliveryStatusMessage, this, msg));
}
void StreamingDestination::HandleI2NPMessage (const uint8_t * buf, size_t len)
{
I2NPHeader * header = (I2NPHeader *)buf;
switch (header->typeID)
{
case eI2NPData:
HandleDataMessage (buf + sizeof (I2NPHeader), be16toh (header->size));
break;
default:
i2p::HandleI2NPMessage (CreateI2NPMessage (buf, GetI2NPMessageLength (buf)));
}
}
StreamingDestinations destinations;
void StreamingDestinations::Start ()
{