|
|
|
@ -10,6 +10,7 @@
@@ -10,6 +10,7 @@
|
|
|
|
|
#include <queue> |
|
|
|
|
#include <string> |
|
|
|
|
#include <memory> |
|
|
|
|
#include <atomic> |
|
|
|
|
#include <cryptopp/osrng.h> |
|
|
|
|
#include <boost/asio.hpp> |
|
|
|
|
#include "TransportSession.h" |
|
|
|
@ -88,6 +89,11 @@ namespace transport
@@ -88,6 +89,11 @@ namespace transport
|
|
|
|
|
void PeerConnected (std::shared_ptr<TransportSession> session); |
|
|
|
|
void PeerDisconnected (std::shared_ptr<TransportSession> session); |
|
|
|
|
|
|
|
|
|
void UpdateSentBytes (uint64_t numBytes) { m_TotalSentBytes += numBytes; }; |
|
|
|
|
void UpdateReceivedBytes (uint64_t numBytes) { m_TotalReceivedBytes += numBytes; }; |
|
|
|
|
uint64_t GetTotalSentBytes () const { return m_TotalSentBytes; }; |
|
|
|
|
uint64_t GetTotalReceivedBytes () const { return m_TotalReceivedBytes; }; |
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
|
|
|
|
|
void Run (); |
|
|
|
@ -118,6 +124,7 @@ namespace transport
@@ -118,6 +124,7 @@ namespace transport
|
|
|
|
|
std::map<i2p::data::IdentHash, Peer> m_Peers; |
|
|
|
|
|
|
|
|
|
DHKeysPairSupplier m_DHKeysPairSupplier; |
|
|
|
|
std::atomic<uint64_t> m_TotalSentBytes, m_TotalReceivedBytes; |
|
|
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
|
|