server I2PTunnel

This commit is contained in:
orignal 2014-08-20 15:03:10 -04:00
parent 7e0a2ae5ab
commit 6c510fadf4
4 changed files with 100 additions and 4 deletions

View file

@ -707,7 +707,15 @@ namespace stream
delete packet;
}
}
StreamingDestination * StreamingDestinations::FindLocalDestination (const i2p::data::IdentHash& destination) const
{
auto it = m_Destinations.find (destination);
if (it != m_Destinations.end ())
return it->second;
return nullptr;
}
Stream * CreateStream (const i2p::data::LeaseSet& remote)
{
return destinations.CreateClientStream (remote);
@ -732,7 +740,12 @@ namespace stream
{
return destinations.GetSharedLocalDestination ();
}
StreamingDestination * FindLocalDestination (const i2p::data::IdentHash& destination)
{
return destinations.FindLocalDestination (destination);
}
void HandleDataMessage (i2p::data::IdentHash destination, const uint8_t * buf, size_t len)
{
uint32_t length = be32toh (*(uint32_t *)buf);