don't create relay response block twice

This commit is contained in:
orignal 2024-10-16 12:07:13 -04:00
parent d69e957213
commit 4f73f60e51
4 changed files with 47 additions and 65 deletions

View file

@ -57,14 +57,18 @@ namespace transport
public:
SSU2HolePunchSession (SSU2Server& server, uint32_t nonce, const boost::asio::ip::udp::endpoint& remoteEndpoint,
std::shared_ptr<const i2p::data::RouterInfo::Address> localAddr);
std::shared_ptr<const i2p::data::RouterInfo::Address> addr);
void SendHolePunch (const uint8_t * relayResponseBlock, size_t relayResponseBlockLen);
private:
void SendHolePunch ();
private:
uint32_t m_Nonce;
uint64_t m_Token; // for RelayResponse block
std::vector<uint8_t> m_RelayResponseBlock;
};
}
}