mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-30 12:47:48 +02:00
shared pointers for streams
This commit is contained in:
parent
4dc33a6f45
commit
4bd8b44ab2
14 changed files with 46 additions and 48 deletions
|
@ -73,7 +73,7 @@ namespace api
|
|||
i2p::data::netdb.RequestDestination (remote, true, dest->GetTunnelPool ());
|
||||
}
|
||||
|
||||
i2p::stream::Stream * CreateStream (i2p::client::ClientDestination * dest, const i2p::data::IdentHash& remote)
|
||||
std::shared_ptr<i2p::stream::Stream> CreateStream (i2p::client::ClientDestination * dest, const i2p::data::IdentHash& remote)
|
||||
{
|
||||
auto leaseSet = i2p::data::netdb.FindLeaseSet (remote);
|
||||
if (leaseSet)
|
||||
|
@ -95,7 +95,7 @@ namespace api
|
|||
dest->AcceptStreams (acceptor);
|
||||
}
|
||||
|
||||
void DestroyStream (i2p::stream::Stream * stream)
|
||||
void DestroyStream (std::shared_ptr<i2p::stream::Stream> stream)
|
||||
{
|
||||
if (stream)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue