mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
establish SSU session through relay
This commit is contained in:
parent
3c8f859169
commit
64aa588a9b
4 changed files with 141 additions and 11 deletions
10
SSU.h
10
SSU.h
|
@ -55,6 +55,8 @@ namespace ssu
|
|||
eSessionStateCreatedReceived,
|
||||
eSessionStateConfirmedSent,
|
||||
eSessionStateConfirmedReceived,
|
||||
eSessionRelayRequestSent,
|
||||
eSessionRelayRequestReceived,
|
||||
eSessionStateEstablished
|
||||
};
|
||||
|
||||
|
@ -68,6 +70,7 @@ namespace ssu
|
|||
void ProcessNextMessage (uint8_t * buf, size_t len, const boost::asio::ip::udp::endpoint& senderEndpoint);
|
||||
|
||||
void Connect ();
|
||||
void ConnectThroughIntroducer (const i2p::data::RouterInfo::Introducer& introducer);
|
||||
void Close ();
|
||||
boost::asio::ip::udp::endpoint& GetRemoteEndpoint () { return m_RemoteEndpoint; };
|
||||
void SendI2NPMessage (I2NPMessage * msg);
|
||||
|
@ -79,10 +82,12 @@ namespace ssu
|
|||
void ProcessMessage (uint8_t * buf, size_t len); // call for established session
|
||||
void ProcessSessionRequest (uint8_t * buf, size_t len, const boost::asio::ip::udp::endpoint& senderEndpoint);
|
||||
void SendSessionRequest ();
|
||||
void SendRelayRequest (const i2p::data::RouterInfo::Introducer& introducer);
|
||||
void ProcessSessionCreated (uint8_t * buf, size_t len);
|
||||
void SendSessionCreated (const uint8_t * x);
|
||||
void ProcessSessionConfirmed (uint8_t * buf, size_t len);
|
||||
void SendSessionConfirmed (const uint8_t * y, const uint8_t * ourAddress, uint32_t relayTag);
|
||||
void ProcessRelayResponse (uint8_t * buf, size_t len);
|
||||
void Established ();
|
||||
void ProcessData (uint8_t * buf, size_t len);
|
||||
void SendMsgAck (uint32_t msgID);
|
||||
|
@ -118,10 +123,11 @@ namespace ssu
|
|||
void Stop ();
|
||||
SSUSession * GetSession (const i2p::data::RouterInfo * router);
|
||||
void DeleteSession (SSUSession * session);
|
||||
void DeleteAllSessions ();
|
||||
|
||||
void DeleteAllSessions ();
|
||||
|
||||
const boost::asio::ip::udp::endpoint& GetEndpoint () const { return m_Endpoint; };
|
||||
void Send (uint8_t * buf, size_t len, const boost::asio::ip::udp::endpoint& to);
|
||||
void ReassignSession (const boost::asio::ip::udp::endpoint& oldEndpoint, const boost::asio::ip::udp::endpoint& newEndpoint);
|
||||
|
||||
private:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue