don't create new tunnel message for encryption/decryption

This commit is contained in:
orignal 2021-10-15 14:01:41 -04:00
parent 44e01b41f8
commit 1af9117b80
5 changed files with 21 additions and 23 deletions

View file

@ -132,7 +132,7 @@ namespace tunnel
void Print (std::stringstream& s) const;
// implements TunnelBase
void HandleTunnelDataMsg (std::shared_ptr<const i2p::I2NPMessage> tunnelMsg);
void HandleTunnelDataMsg (std::shared_ptr<i2p::I2NPMessage>&& tunnelMsg);
bool IsInbound() const { return false; }
@ -148,7 +148,7 @@ namespace tunnel
public:
InboundTunnel (std::shared_ptr<const TunnelConfig> config): Tunnel (config), m_Endpoint (true) {};
void HandleTunnelDataMsg (std::shared_ptr<const I2NPMessage> msg);
void HandleTunnelDataMsg (std::shared_ptr<I2NPMessage>&& msg);
virtual size_t GetNumReceivedBytes () const { return m_Endpoint.GetNumReceivedBytes (); };
void Print (std::stringstream& s) const;
bool IsInbound() const { return true; }