mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
show tags for local destinations
This commit is contained in:
parent
f593802a51
commit
f7e21dbe5c
10
Garlic.h
10
Garlic.h
@ -113,6 +113,10 @@ namespace garlic
|
||||
|
||||
i2p::crypto::CBCEncryption m_Encryption;
|
||||
std::unique_ptr<const i2p::crypto::ElGamalEncryption> m_ElGamalEncryption;
|
||||
|
||||
public:
|
||||
// for HTTP only
|
||||
size_t GetNumOutgoingTags () const { return m_SessionTags.size (); };
|
||||
};
|
||||
|
||||
class GarlicDestination: public i2p::data::LocalDestination
|
||||
@ -163,6 +167,12 @@ namespace garlic
|
||||
uint32_t m_LastTagsCleanupTime;
|
||||
// DeliveryStatus
|
||||
std::map<uint32_t, std::shared_ptr<GarlicRoutingSession> > m_CreatedSessions; // msgID -> session
|
||||
|
||||
public:
|
||||
|
||||
// for HTTP only
|
||||
size_t GetNumIncomingTags () const { return m_Tags.size (); }
|
||||
const decltype(m_Sessions)& GetSessions () const { return m_Sessions; };
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -534,6 +534,13 @@ namespace util
|
||||
s << "<br>\r\n" << std::endl;
|
||||
}
|
||||
}
|
||||
s << "<b>Tags</b><br>Incoming: " << dest->GetNumIncomingTags () << "<br>Outgoing:<br>" << std::endl;
|
||||
for (auto it: dest->GetSessions ())
|
||||
{
|
||||
s << i2p::client::context.GetAddressBook ().ToAddress(it.first) << " ";
|
||||
s << it.second->GetNumOutgoingTags () << "<br>" << std::endl;
|
||||
}
|
||||
s << "<br>" << std::endl;
|
||||
// s << "<br>\r\n<b>Streams:</b><br>\r\n";
|
||||
// for (auto it: dest->GetStreamingDestination ()->GetStreams ())
|
||||
// {
|
||||
|
Loading…
Reference in New Issue
Block a user