|
|
@ -14,8 +14,7 @@ namespace tunnel |
|
|
|
class TunnelGatewayBuffer |
|
|
|
class TunnelGatewayBuffer |
|
|
|
{ |
|
|
|
{ |
|
|
|
public: |
|
|
|
public: |
|
|
|
TunnelGatewayBuffer (uint32_t tunnelID): m_TunnelID (tunnelID), |
|
|
|
TunnelGatewayBuffer (uint32_t tunnelID); |
|
|
|
m_CurrentTunnelDataMsg (nullptr), m_RemainingSize (0) {}; |
|
|
|
|
|
|
|
~TunnelGatewayBuffer (); |
|
|
|
~TunnelGatewayBuffer (); |
|
|
|
void PutI2NPMsg (const TunnelMessageBlock& block); |
|
|
|
void PutI2NPMsg (const TunnelMessageBlock& block); |
|
|
|
const std::vector<std::shared_ptr<I2NPMessage> >& GetTunnelDataMsgs () const { return m_TunnelDataMsgs; }; |
|
|
|
const std::vector<std::shared_ptr<I2NPMessage> >& GetTunnelDataMsgs () const { return m_TunnelDataMsgs; }; |
|
|
@ -32,13 +31,14 @@ namespace tunnel |
|
|
|
std::vector<std::shared_ptr<I2NPMessage> > m_TunnelDataMsgs; |
|
|
|
std::vector<std::shared_ptr<I2NPMessage> > m_TunnelDataMsgs; |
|
|
|
std::shared_ptr<I2NPMessage> m_CurrentTunnelDataMsg; |
|
|
|
std::shared_ptr<I2NPMessage> m_CurrentTunnelDataMsg; |
|
|
|
size_t m_RemainingSize; |
|
|
|
size_t m_RemainingSize; |
|
|
|
|
|
|
|
uint8_t m_NonZeroRandomBuffer[TUNNEL_DATA_MAX_PAYLOAD_SIZE]; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
class TunnelGateway |
|
|
|
class TunnelGateway |
|
|
|
{ |
|
|
|
{ |
|
|
|
public: |
|
|
|
public: |
|
|
|
|
|
|
|
|
|
|
|
TunnelGateway (TunnelBase * tunnel): |
|
|
|
TunnelGateway (TunnelBase * tunnel): |
|
|
|
m_Tunnel (tunnel), m_Buffer (tunnel->GetNextTunnelID ()), m_NumSentBytes (0) {}; |
|
|
|
m_Tunnel (tunnel), m_Buffer (tunnel->GetNextTunnelID ()), m_NumSentBytes (0) {}; |
|
|
|
void SendTunnelDataMsg (const TunnelMessageBlock& block); |
|
|
|
void SendTunnelDataMsg (const TunnelMessageBlock& block); |
|
|
|
void PutTunnelDataMsg (const TunnelMessageBlock& block); |
|
|
|
void PutTunnelDataMsg (const TunnelMessageBlock& block); |
|
|
|