mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
create streams through ClientDestination
This commit is contained in:
parent
4d97b0e206
commit
b11877d002
8 changed files with 63 additions and 21 deletions
|
@ -517,7 +517,7 @@ namespace util
|
|||
if (m_Stream)
|
||||
{
|
||||
m_Stream->Close ();
|
||||
i2p::client::context.GetSharedLocalDestination ()->GetStreamingDestination ()->DeleteStream (m_Stream);
|
||||
i2p::stream::DeleteStream (m_Stream);
|
||||
m_Stream = nullptr;
|
||||
}
|
||||
m_Socket->close ();
|
||||
|
@ -880,7 +880,7 @@ namespace util
|
|||
void HTTPConnection::SendToDestination (const i2p::data::LeaseSet * remote, const char * buf, size_t len)
|
||||
{
|
||||
if (!m_Stream)
|
||||
m_Stream = i2p::client::context.GetSharedLocalDestination ()->GetStreamingDestination ()->CreateNewOutgoingStream (*remote);
|
||||
m_Stream = i2p::client::context.GetSharedLocalDestination ()->CreateStream (*remote);
|
||||
if (m_Stream)
|
||||
{
|
||||
m_Stream->Send ((uint8_t *)buf, len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue