mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-06-19 12:36:42 +02:00
don't send session status create before destination is ready
This commit is contained in:
parent
8a3d6ddb3e
commit
ab1abf584f
2 changed files with 30 additions and 3 deletions
|
@ -30,6 +30,7 @@ namespace client
|
|||
const size_t I2CP_MAX_MESSAGE_LENGTH = 65535;
|
||||
const size_t I2CP_MAX_SEND_QUEUE_SIZE = 1024*1024; // in bytes, 1M
|
||||
const int I2CP_LEASESET_CREATION_TIMEOUT = 10; // in seconds
|
||||
const int I2CP_SESSION_READINESS_CHECK_INTERVAL = 3; // in seconds
|
||||
|
||||
const size_t I2CP_HEADER_LENGTH_OFFSET = 0;
|
||||
const size_t I2CP_HEADER_TYPE_OFFSET = I2CP_HEADER_LENGTH_OFFSET + 4;
|
||||
|
@ -197,10 +198,13 @@ namespace client
|
|||
void SendSessionStatusMessage (I2CPSessionStatus status);
|
||||
void SendHostReplyMessage (uint32_t requestID, std::shared_ptr<const i2p::data::IdentityEx> identity);
|
||||
|
||||
void HandleSessionReadinessCheckTimer (const boost::system::error_code& ecode);
|
||||
|
||||
private:
|
||||
|
||||
I2CPServer& m_Owner;
|
||||
std::shared_ptr<boost::asio::ip::tcp::socket> m_Socket;
|
||||
boost::asio::deadline_timer m_ReadinessCheckTimer;
|
||||
uint8_t m_Header[I2CP_HEADER_SIZE], m_Payload[I2CP_MAX_MESSAGE_LENGTH];
|
||||
size_t m_PayloadLen;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue