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

Method FindRelaySession

libi2pd/SSU2.cpp:646–660  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

644 }
645
646 std::shared_ptr<SSU2Session> SSU2Server::FindRelaySession (uint32_t tag)
647 {
648 auto it = m_Relays.find (tag);
649 if (it != m_Relays.end ())
650 {
651 if (!it->second.expired ())
652 {
653 auto s = it->second.lock ();
654 if (s && s->IsEstablished ())
655 return s;
656 }
657 m_Relays.erase (it);
658 }
659 return nullptr;
660 }
661
662 bool SSU2Server::AddPeerTest (uint32_t nonce, std::shared_ptr<SSU2Session> aliceSession, uint64_t ts)
663 {

Callers 1

HandleRelayRequestMethod · 0.80

Calls 1

IsEstablishedMethod · 0.45

Tested by

no test coverage detected