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

Method GetSharedRoutingPath

libi2pd/Garlic.cpp:44–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 }
43
44 std::shared_ptr<GarlicRoutingPath> GarlicRoutingSession::GetSharedRoutingPath ()
45 {
46 if (!m_SharedRoutingPath) return nullptr;
47 uint32_t ts = i2p::util::GetSecondsSinceEpoch ();
48 if (!m_SharedRoutingPath->outboundTunnel->IsEstablished () ||
49 ts*1000LL > m_SharedRoutingPath->remoteLease->endDate ||
50 ts > m_SharedRoutingPath->updateTime + ROUTING_PATH_EXPIRATION_TIMEOUT)
51 m_SharedRoutingPath = nullptr;
52 return m_SharedRoutingPath;
53 }
54
55 void GarlicRoutingSession::SetSharedRoutingPath (std::shared_ptr<GarlicRoutingPath> path)
56 {

Callers 3

SendMsgMethod · 0.45
CleanupExpiredTagsMethod · 0.45
SendPacketsMethod · 0.45

Calls 2

GetSecondsSinceEpochFunction · 0.85
IsEstablishedMethod · 0.45

Tested by

no test coverage detected