mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
eliminate extra copy
This commit is contained in:
parent
7a79d49e6e
commit
acbe0d801d
2 changed files with 12 additions and 12 deletions
|
@ -16,12 +16,13 @@ namespace tunnel
|
|||
TunnelGatewayBuffer (uint32_t tunnelID): m_TunnelID (tunnelID),
|
||||
m_CurrentTunnelDataMsg (nullptr), m_RemainingSize (0) {};
|
||||
void PutI2NPMsg (const TunnelMessageBlock& block);
|
||||
const std::vector<I2NPMessage *> GetTunnelDataMsgs ();
|
||||
const std::vector<I2NPMessage *>& GetTunnelDataMsgs () const { return m_TunnelDataMsgs; };
|
||||
void ClearTunnelDataMsgs ();
|
||||
void CompleteCurrentTunnelDataMessage ();
|
||||
|
||||
private:
|
||||
|
||||
void CreateCurrentTunnelDataMessage ();
|
||||
void CompleteCurrentTunnelDataMessage ();
|
||||
|
||||
private:
|
||||
|
||||
|
@ -37,11 +38,11 @@ namespace tunnel
|
|||
|
||||
TunnelGateway (TunnelBase * tunnel):
|
||||
m_Tunnel (tunnel), m_Buffer (tunnel->GetNextTunnelID ()), m_NumSentBytes (0) {};
|
||||
void SendTunnelDataMsg (const TunnelMessageBlock& block);
|
||||
void PutTunnelDataMsg (const TunnelMessageBlock& block);
|
||||
void SendBuffer ();
|
||||
void SendTunnelDataMsg (const TunnelMessageBlock& block);
|
||||
void PutTunnelDataMsg (const TunnelMessageBlock& block);
|
||||
void SendBuffer ();
|
||||
size_t GetNumSentBytes () const { return m_NumSentBytes; };
|
||||
|
||||
|
||||
private:
|
||||
|
||||
TunnelBase * m_Tunnel;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue