mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
introducers in local RouterInfo
This commit is contained in:
parent
da9c281d9a
commit
30ffda7708
4 changed files with 110 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue