1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-02-02 02:44:15 +00:00

show queue size

This commit is contained in:
orignal 2014-10-18 15:50:34 -04:00
parent fcd3680547
commit 9b3ac19b58
3 changed files with 5 additions and 0 deletions

View File

@ -817,6 +817,7 @@ namespace util
{ {
s << it.first << "->" << it.second->GetRemoteIdentity ().GetIdentHash ().ToBase32 () << ".b32.i2p "; s << it.first << "->" << it.second->GetRemoteIdentity ().GetIdentHash ().ToBase32 () << ".b32.i2p ";
s << " [" << it.second->GetNumSentBytes () << ":" << it.second->GetNumReceivedBytes () << "]"; s << " [" << it.second->GetNumSentBytes () << ":" << it.second->GetNumReceivedBytes () << "]";
s << " [out:" << it.second->GetSendQueueSize () << "][in:" << it.second->GetReceiveQueueSize () << "]";
s << "<br>"<< std::endl; s << "<br>"<< std::endl;
} }
} }

View File

@ -412,6 +412,8 @@ namespace stream
if (isEmpty) if (isEmpty)
ScheduleResend (); ScheduleResend ();
} }
else
delete packet;
return true; return true;
} }
else else

View File

@ -100,6 +100,8 @@ namespace stream
size_t GetNumSentBytes () const { return m_NumSentBytes; }; size_t GetNumSentBytes () const { return m_NumSentBytes; };
size_t GetNumReceivedBytes () const { return m_NumReceivedBytes; }; size_t GetNumReceivedBytes () const { return m_NumReceivedBytes; };
size_t GetSendQueueSize () const { return m_SentPackets.size (); };
size_t GetReceiveQueueSize () const { return m_ReceiveQueue.size (); };
private: private: