mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
send ping every keealive interval for client tunnels
This commit is contained in:
parent
b10e5ce358
commit
2eded7cdd7
6 changed files with 82 additions and 6 deletions
|
@ -1096,6 +1096,31 @@ namespace client
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
void ClientDestination::SendPing (const i2p::data::IdentHash& to)
|
||||
{
|
||||
if (m_StreamingDestination)
|
||||
{
|
||||
auto leaseSet = FindLeaseSet (to);
|
||||
if (leaseSet)
|
||||
m_StreamingDestination->SendPing (leaseSet);
|
||||
else
|
||||
RequestDestination (to,
|
||||
[s = m_StreamingDestination](std::shared_ptr<const i2p::data::LeaseSet> ls)
|
||||
{
|
||||
if (ls) s->SendPing (ls);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void ClientDestination::SendPing (std::shared_ptr<const i2p::data::BlindedPublicKey> to)
|
||||
{
|
||||
RequestDestinationWithEncryptedLeaseSet (to,
|
||||
[s = m_StreamingDestination](std::shared_ptr<const i2p::data::LeaseSet> ls)
|
||||
{
|
||||
if (ls) s->SendPing (ls);
|
||||
});
|
||||
}
|
||||
|
||||
std::shared_ptr<i2p::stream::StreamingDestination> ClientDestination::GetStreamingDestination (int port) const
|
||||
{
|
||||
if (port)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue