MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / PublishNTCP2Address

Method PublishNTCP2Address

libi2pd/RouterContext.cpp:411–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409 }
410
411 void RouterContext::PublishNTCP2Address (std::shared_ptr<i2p::data::RouterInfo::Address> address,
412 int port, bool publish, int version) const
413 {
414 if (!address) return;
415 if (!port && !address->port) port = SelectRandomPort ();
416 if (port) address->port = port;
417 address->published = publish;
418 address->v = version;
419 memcpy (address->i, m_NTCP2Keys->iv, 16);
420 }
421
422 void RouterContext::PublishNTCP2Address (int port, bool publish, bool v4, bool v6, bool ygg, int version)
423 {

Callers 1

InitTransportsFunction · 0.80

Calls 1

GetAddressesMethod · 0.80

Tested by

no test coverage detected