mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-11-04 08:17:30 +00:00
introducers in local RouterInfo
This commit is contained in:
1 parent
da9c281d9a
commit
30ffda7708
4 files changed
+110
-2
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user