mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
send SessionCreated
This commit is contained in:
parent
11f9eeabf1
commit
7faa732f38
2 changed files with 65 additions and 29 deletions
|
@ -34,17 +34,6 @@ namespace transport
|
|||
class SSU2Server;
|
||||
class SSU2Session: public TransportSession, public std::enable_shared_from_this<SSU2Session>
|
||||
{
|
||||
union Header2
|
||||
{
|
||||
uint64_t ll;
|
||||
uint8_t buf[8];
|
||||
struct
|
||||
{
|
||||
uint8_t packetNum[4];
|
||||
uint8_t type;
|
||||
uint8_t flags[3];
|
||||
} h;
|
||||
};
|
||||
union Header
|
||||
{
|
||||
uint64_t ll[2];
|
||||
|
@ -52,7 +41,9 @@ namespace transport
|
|||
struct
|
||||
{
|
||||
uint64_t connID;
|
||||
Header2 h2;
|
||||
uint8_t packetNum[4];
|
||||
uint8_t type;
|
||||
uint8_t flags[3];
|
||||
} h;
|
||||
};
|
||||
|
||||
|
@ -62,6 +53,8 @@ namespace transport
|
|||
std::shared_ptr<const i2p::data::RouterInfo::Address> addr = nullptr, bool peerTest = false);
|
||||
~SSU2Session ();
|
||||
|
||||
void SetRemoteEndpoint (const boost::asio::ip::udp::endpoint& ep) { m_RemoteEndpoint = ep; };
|
||||
|
||||
void Done () override {};
|
||||
void SendI2NPMessages (const std::vector<std::shared_ptr<I2NPMessage> >& msgs) override {};
|
||||
|
||||
|
@ -71,6 +64,7 @@ namespace transport
|
|||
private:
|
||||
|
||||
void SendSessionRequest ();
|
||||
void SendSessionCreated (const uint8_t * X);
|
||||
|
||||
private:
|
||||
|
||||
|
@ -78,6 +72,7 @@ namespace transport
|
|||
std::shared_ptr<i2p::crypto::X25519Keys> m_EphemeralKeys;
|
||||
std::unique_ptr<i2p::crypto::NoiseSymmetricState> m_NoiseState;
|
||||
std::shared_ptr<const i2p::data::RouterInfo::Address> m_Address;
|
||||
boost::asio::ip::udp::endpoint m_RemoteEndpoint;
|
||||
uint64_t m_DestConnID, m_SourceConnID;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue