mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
show streams from all streaming destinations
This commit is contained in:
parent
97afa502c5
commit
941f30d1ea
@ -780,5 +780,19 @@ namespace client
|
||||
}
|
||||
LogPrint(eLogError, "Destinations: Can't save keys to ", path);
|
||||
}
|
||||
|
||||
std::vector<std::shared_ptr<const i2p::stream::Stream> > ClientDestination::GetAllStreams () const
|
||||
{
|
||||
std::vector<std::shared_ptr<const i2p::stream::Stream> > ret;
|
||||
if (m_StreamingDestination)
|
||||
{
|
||||
for (auto& it: m_StreamingDestination->GetStreams ())
|
||||
ret.push_back (it.second);
|
||||
}
|
||||
for (auto& it: m_StreamingDestinationsByPorts)
|
||||
for (auto& it1: it.second->GetStreams ())
|
||||
ret.push_back (it1.second);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -159,6 +159,7 @@ namespace client
|
||||
|
||||
// for HTTP only
|
||||
int GetNumRemoteLeaseSets () const { return m_RemoteLeaseSets.size (); };
|
||||
std::vector<std::shared_ptr<const i2p::stream::Stream> > GetAllStreams () const;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -609,19 +609,19 @@ namespace util
|
||||
s << "<th>Status</th>";
|
||||
s << "</tr>";
|
||||
|
||||
for (auto it: dest->GetStreamingDestination ()->GetStreams ())
|
||||
for (auto it: dest->GetAllStreams ())
|
||||
{
|
||||
s << "<tr>";
|
||||
s << "<td>" << it.first << "</td>";
|
||||
s << "<td>" << i2p::client::context.GetAddressBook ().ToAddress(it.second->GetRemoteIdentity ()) << "</td>";
|
||||
s << "<td>" << it.second->GetNumSentBytes () << "</td>";
|
||||
s << "<td>" << it.second->GetNumReceivedBytes () << "</td>";
|
||||
s << "<td>" << it.second->GetSendQueueSize () << "</td>";
|
||||
s << "<td>" << it.second->GetReceiveQueueSize () << "</td>";
|
||||
s << "<td>" << it.second->GetSendBufferSize () << "</td>";
|
||||
s << "<td>" << it.second->GetRTT () << "</td>";
|
||||
s << "<td>" << it.second->GetWindowSize () << "</td>";
|
||||
s << "<td>" << (int)it.second->GetStatus () << "</td>";
|
||||
s << "<td>" << it->GetSendStreamID () << "</td>";
|
||||
s << "<td>" << i2p::client::context.GetAddressBook ().ToAddress(it->GetRemoteIdentity ()) << "</td>";
|
||||
s << "<td>" << it->GetNumSentBytes () << "</td>";
|
||||
s << "<td>" << it->GetNumReceivedBytes () << "</td>";
|
||||
s << "<td>" << it->GetSendQueueSize () << "</td>";
|
||||
s << "<td>" << it->GetReceiveQueueSize () << "</td>";
|
||||
s << "<td>" << it->GetSendBufferSize () << "</td>";
|
||||
s << "<td>" << it->GetRTT () << "</td>";
|
||||
s << "<td>" << it->GetWindowSize () << "</td>";
|
||||
s << "<td>" << (int)it->GetStatus () << "</td>";
|
||||
s << "</tr><br>\r\n" << std::endl;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user