I2NP messages pool for I2CP

pull/1727/head
orignal 2 years ago
parent 73b77c83b8
commit 40e6d675c5

@ -146,7 +146,7 @@ namespace client
void I2CPDestination::SendMsgTo (const uint8_t * payload, size_t len, const i2p::data::IdentHash& ident, uint32_t nonce)
{
auto msg = NewI2NPMessage ();
auto msg = m_I2NPMsgsPool.AcquireSharedMt ();
uint8_t * buf = msg->GetPayload ();
htobe32buf (buf, len);
memcpy (buf + 4, payload, len);

@ -122,6 +122,7 @@ namespace client
uint64_t m_LeaseSetExpirationTime;
bool m_IsCreatingLeaseSet;
boost::asio::deadline_timer m_LeaseSetCreationTimer;
i2p::util::MemoryPoolMt<I2NPMessageBuffer<I2NP_MAX_MESSAGE_SIZE> > m_I2NPMsgsPool;
};
class RunnableI2CPDestination: private i2p::util::RunnableService, public I2CPDestination

Loading…
Cancel
Save