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

Method CreateRequestMessage

libi2pd/NetDbRequests.cpp:37–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 }
36
37 std::shared_ptr<I2NPMessage> RequestedDestination::CreateRequestMessage (std::shared_ptr<const RouterInfo> router,
38 std::shared_ptr<const i2p::tunnel::InboundTunnel> replyTunnel)
39 {
40 std::shared_ptr<I2NPMessage> msg;
41 if(replyTunnel)
42 msg = i2p::CreateRouterInfoDatabaseLookupMsg (m_Destination,
43 replyTunnel->GetNextIdentHash (), replyTunnel->GetNextTunnelID (), m_IsExploratory,
44 &m_ExcludedPeers);
45 else
46 msg = i2p::CreateRouterInfoDatabaseLookupMsg(m_Destination, i2p::context.GetIdentHash(), 0, m_IsExploratory, &m_ExcludedPeers);
47 if(router)
48 m_ExcludedPeers.insert (router->GetIdentHash ());
49 m_LastRequestTime = i2p::util::GetMillisecondsSinceEpoch ();
50 m_NumAttempts++;
51 m_IsSentDirectly = false;
52 return msg;
53 }
54
55 std::shared_ptr<I2NPMessage> RequestedDestination::CreateRequestMessage (const IdentHash& floodfill)
56 {

Callers 2

SendNextRequestMethod · 0.80
ExploreMethod · 0.80

Calls 3

GetNextTunnelIDMethod · 0.45

Tested by

no test coverage detected