introducers in local RouterInfo

This commit is contained in:
orignal committed 2014-09-01 17:34:20 -04:00
1 parent da9c281d9a
commit 30ffda7708
4 files changed
+110 -2

No files matched your search

+16
View File
@@ -80,6 +80,22 @@ namespace i2p
UpdateRouterInfo ();
}
void RouterContext::AddIntroducer (const i2p::data::RouterInfo& routerInfo, uint32_t tag)
{
auto address = routerInfo.GetSSUAddress ();
if (address)
{
if (m_RouterInfo.AddIntroducer (address, tag))
UpdateRouterInfo ();
}
}
void RouterContext::RemoveIntroducer (uint32_t tag)
{
if (m_RouterInfo.RemoveIntroducer (tag))
UpdateRouterInfo ();
}
bool RouterContext::Load ()
{
std::ifstream fk (i2p::util::filesystem::GetFullPath (ROUTER_KEYS).c_str (), std::ifstream::binary | std::ofstream::in);