use shared ClientDestination

This commit is contained in:
orignal 2016-05-25 16:18:02 -04:00
parent 789eb48698
commit c7173d5e1c
6 changed files with 16 additions and 14 deletions

View file

@ -23,7 +23,7 @@ namespace i2p
{
namespace client
{
class LeaseSetDestination;
class ClientDestination;
}
namespace stream
{
@ -193,7 +193,7 @@ namespace stream
typedef std::function<void (std::shared_ptr<Stream>)> Acceptor;
StreamingDestination (std::shared_ptr<i2p::client::LeaseSetDestination> owner, uint16_t localPort = 0, bool gzip = true);
StreamingDestination (std::shared_ptr<i2p::client::ClientDestination> owner, uint16_t localPort = 0, bool gzip = true);
~StreamingDestination ();
void Start ();
@ -204,7 +204,7 @@ namespace stream
void SetAcceptor (const Acceptor& acceptor);
void ResetAcceptor ();
bool IsAcceptorSet () const { return m_Acceptor != nullptr; };
std::shared_ptr<i2p::client::LeaseSetDestination> GetOwner () const { return m_Owner; };
std::shared_ptr<i2p::client::ClientDestination> GetOwner () const { return m_Owner; };
uint16_t GetLocalPort () const { return m_LocalPort; };
void HandleDataMessagePayload (const uint8_t * buf, size_t len);
@ -218,7 +218,7 @@ namespace stream
private:
std::shared_ptr<i2p::client::LeaseSetDestination> m_Owner;
std::shared_ptr<i2p::client::ClientDestination> m_Owner;
uint16_t m_LocalPort;
bool m_Gzip; // gzip compression of data messages
std::mutex m_StreamsMutex;