|
|
@ -11,6 +11,7 @@ |
|
|
|
#include "LeaseSet.h" |
|
|
|
#include "LeaseSet.h" |
|
|
|
#include "I2NPProtocol.h" |
|
|
|
#include "I2NPProtocol.h" |
|
|
|
#include "Tunnel.h" |
|
|
|
#include "Tunnel.h" |
|
|
|
|
|
|
|
#include "TunnelPool.h" |
|
|
|
|
|
|
|
|
|
|
|
namespace i2p |
|
|
|
namespace i2p |
|
|
|
{ |
|
|
|
{ |
|
|
@ -97,22 +98,27 @@ namespace stream |
|
|
|
i2p::tunnel::OutboundTunnel * m_OutboundTunnel; |
|
|
|
i2p::tunnel::OutboundTunnel * m_OutboundTunnel; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
class StreamingDestination |
|
|
|
class StreamingDestination: public i2p::data::LocalDestination |
|
|
|
{ |
|
|
|
{ |
|
|
|
public: |
|
|
|
public: |
|
|
|
|
|
|
|
|
|
|
|
StreamingDestination (); |
|
|
|
StreamingDestination (); |
|
|
|
~StreamingDestination (); |
|
|
|
~StreamingDestination (); |
|
|
|
|
|
|
|
void Start (); |
|
|
|
|
|
|
|
void Stop (); |
|
|
|
|
|
|
|
|
|
|
|
const i2p::data::Keys& GetKeys () const { return m_Keys; }; |
|
|
|
const i2p::data::Keys& GetKeys () const { return m_Keys; }; |
|
|
|
const i2p::data::Identity& GetIdentity () const { return m_Identity; }; |
|
|
|
const i2p::data::Identity& GetIdentity () const { return m_Identity; }; |
|
|
|
I2NPMessage * GetLeaseSet (); |
|
|
|
I2NPMessage * GetLeaseSet (); |
|
|
|
void Sign (uint8_t * buf, int len, uint8_t * signature) const; |
|
|
|
void Sign (uint8_t * buf, int len, uint8_t * signature) const; |
|
|
|
|
|
|
|
|
|
|
|
Stream * CreateNewStream (const i2p::data::LeaseSet& remote); |
|
|
|
Stream * CreateNewStream (const i2p::data::LeaseSet& remote); |
|
|
|
void DeleteStream (Stream * stream); |
|
|
|
void DeleteStream (Stream * stream); |
|
|
|
void HandleNextPacket (Packet * packet); |
|
|
|
void HandleNextPacket (Packet * packet); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// implements LocalDestination
|
|
|
|
|
|
|
|
void UpdateLeaseSet () {}; // TODO:
|
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
private: |
|
|
|
|
|
|
|
|
|
|
|
I2NPMessage * CreateLeaseSet () const; |
|
|
|
I2NPMessage * CreateLeaseSet () const; |
|
|
@ -124,6 +130,7 @@ namespace stream |
|
|
|
i2p::data::Identity m_Identity; |
|
|
|
i2p::data::Identity m_Identity; |
|
|
|
i2p::data::IdentHash m_IdentHash; |
|
|
|
i2p::data::IdentHash m_IdentHash; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
i2p::tunnel::TunnelPool m_TunnelPool; |
|
|
|
I2NPMessage * m_LeaseSet; |
|
|
|
I2NPMessage * m_LeaseSet; |
|
|
|
|
|
|
|
|
|
|
|
CryptoPP::DSA::PrivateKey m_SigningPrivateKey; |
|
|
|
CryptoPP::DSA::PrivateKey m_SigningPrivateKey; |
|
|
|