mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 04:04:16 +00:00
I2NP messages pool for I2CP
This commit is contained in:
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)
|
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 ();
|
uint8_t * buf = msg->GetPayload ();
|
||||||
htobe32buf (buf, len);
|
htobe32buf (buf, len);
|
||||||
memcpy (buf + 4, payload, len);
|
memcpy (buf + 4, payload, len);
|
||||||
|
@ -122,6 +122,7 @@ namespace client
|
|||||||
uint64_t m_LeaseSetExpirationTime;
|
uint64_t m_LeaseSetExpirationTime;
|
||||||
bool m_IsCreatingLeaseSet;
|
bool m_IsCreatingLeaseSet;
|
||||||
boost::asio::deadline_timer m_LeaseSetCreationTimer;
|
boost::asio::deadline_timer m_LeaseSetCreationTimer;
|
||||||
|
i2p::util::MemoryPoolMt<I2NPMessageBuffer<I2NP_MAX_MESSAGE_SIZE> > m_I2NPMsgsPool;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RunnableI2CPDestination: private i2p::util::RunnableService, public I2CPDestination
|
class RunnableI2CPDestination: private i2p::util::RunnableService, public I2CPDestination
|
||||||
|
Loading…
x
Reference in New Issue
Block a user