mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-08-26 10:10:24 +01:00
store shared routing path and with Java separately
Some checks are pending
Build Debian packages / bookworm (push) Waiting to run
Build Debian packages / bullseye (push) Waiting to run
Build Debian packages / trixie (push) Waiting to run
Build on FreeBSD / with UPnP (push) Waiting to run
Build on OSX / With USE_UPNP=no (push) Waiting to run
Build on OSX / With USE_UPNP=yes (push) Waiting to run
Build on Windows / ucrt-x86_64 (push) Waiting to run
Build on Windows / clang-x86_64 (push) Waiting to run
Build on Windows / i686 (push) Waiting to run
Build on Windows / x86_64 (push) Waiting to run
Build on Windows / CMake clang-x86_64 (push) Waiting to run
Build on Windows / CMake i686 (push) Waiting to run
Build on Windows / CMake ucrt-x86_64 (push) Waiting to run
Build on Windows / CMake x86_64 (push) Waiting to run
Build on Windows / XP (push) Waiting to run
Build on Ubuntu / Make with USE_UPNP=no (push) Waiting to run
Build on Ubuntu / Make with USE_UPNP=yes (push) Waiting to run
Build on Ubuntu / CMake with -DWITH_UPNP=OFF (push) Waiting to run
Build on Ubuntu / CMake with -DWITH_UPNP=ON (push) Waiting to run
Build containers / Building container for linux/amd64 (push) Waiting to run
Build containers / Building container for linux/arm64 (push) Waiting to run
Build containers / Building container for linux/arm/v7 (push) Waiting to run
Build containers / Building container for linux/386 (push) Waiting to run
Build containers / Pushing merged manifest (push) Blocked by required conditions
Some checks are pending
Build Debian packages / bookworm (push) Waiting to run
Build Debian packages / bullseye (push) Waiting to run
Build Debian packages / trixie (push) Waiting to run
Build on FreeBSD / with UPnP (push) Waiting to run
Build on OSX / With USE_UPNP=no (push) Waiting to run
Build on OSX / With USE_UPNP=yes (push) Waiting to run
Build on Windows / ucrt-x86_64 (push) Waiting to run
Build on Windows / clang-x86_64 (push) Waiting to run
Build on Windows / i686 (push) Waiting to run
Build on Windows / x86_64 (push) Waiting to run
Build on Windows / CMake clang-x86_64 (push) Waiting to run
Build on Windows / CMake i686 (push) Waiting to run
Build on Windows / CMake ucrt-x86_64 (push) Waiting to run
Build on Windows / CMake x86_64 (push) Waiting to run
Build on Windows / XP (push) Waiting to run
Build on Ubuntu / Make with USE_UPNP=no (push) Waiting to run
Build on Ubuntu / Make with USE_UPNP=yes (push) Waiting to run
Build on Ubuntu / CMake with -DWITH_UPNP=OFF (push) Waiting to run
Build on Ubuntu / CMake with -DWITH_UPNP=ON (push) Waiting to run
Build containers / Building container for linux/amd64 (push) Waiting to run
Build containers / Building container for linux/arm64 (push) Waiting to run
Build containers / Building container for linux/arm/v7 (push) Waiting to run
Build containers / Building container for linux/386 (push) Waiting to run
Build containers / Pushing merged manifest (push) Blocked by required conditions
This commit is contained in:
parent
253a892b0f
commit
27b005a9b2
3 changed files with 9 additions and 10 deletions
|
@ -28,7 +28,7 @@ namespace garlic
|
|||
{
|
||||
GarlicRoutingSession::GarlicRoutingSession (GarlicDestination * owner, bool attachLeaseSet):
|
||||
m_Owner (owner), m_LeaseSetUpdateStatus (attachLeaseSet ? eLeaseSetUpdated : eLeaseSetDoNotSend),
|
||||
m_LeaseSetUpdateMsgID (0)
|
||||
m_LeaseSetUpdateMsgID (0), m_IsWithJava (false)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,6 @@ namespace garlic
|
|||
// for streaming only
|
||||
int rtt; // RTT
|
||||
uint32_t updateTime; // seconds since epoch
|
||||
bool isJava; // based on choked value
|
||||
};
|
||||
|
||||
class GarlicDestination;
|
||||
|
@ -132,6 +131,9 @@ namespace garlic
|
|||
std::shared_ptr<GarlicRoutingPath> GetSharedRoutingPath ();
|
||||
void SetSharedRoutingPath (std::shared_ptr<GarlicRoutingPath> path);
|
||||
|
||||
bool IsWithJava () const { return m_IsWithJava; }
|
||||
void SetIsWithJava (bool isWithJava) { m_IsWithJava = isWithJava; }
|
||||
|
||||
GarlicDestination * GetOwner () const { return m_Owner; }
|
||||
void SetOwner (GarlicDestination * owner) { m_Owner = owner; }
|
||||
|
||||
|
@ -154,6 +156,7 @@ namespace garlic
|
|||
uint64_t m_LeaseSetSubmissionTime; // in milliseconds
|
||||
|
||||
std::shared_ptr<GarlicRoutingPath> m_SharedRoutingPath;
|
||||
bool m_IsWithJava; // based on choked value from streaming
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
@ -426,11 +426,7 @@ namespace stream
|
|||
LogPrint (eLogDebug, "Streaming: limit window size for java client");
|
||||
m_MaxWindowSize = 32;
|
||||
m_IsJavaClient = true;
|
||||
if (m_RoutingSession)
|
||||
{
|
||||
auto path = m_RoutingSession->GetSharedRoutingPath ();
|
||||
if (path) path->isJava = true;
|
||||
}
|
||||
if (m_RoutingSession) m_RoutingSession->SetIsWithJava (true);
|
||||
}
|
||||
m_WindowDropTargetSize = MIN_WINDOW_SIZE;
|
||||
m_LastWindowDropSize = 0;
|
||||
|
@ -772,7 +768,7 @@ namespace stream
|
|||
if (m_RoutingSession)
|
||||
m_RoutingSession->SetSharedRoutingPath (
|
||||
std::make_shared<i2p::garlic::GarlicRoutingPath> (
|
||||
i2p::garlic::GarlicRoutingPath{m_CurrentOutboundTunnel, m_CurrentRemoteLease, (int)m_RTT, 0, false}));
|
||||
i2p::garlic::GarlicRoutingPath{m_CurrentOutboundTunnel, m_CurrentRemoteLease, (int)m_RTT, 0}));
|
||||
m_IsFirstACK = false;
|
||||
}
|
||||
if (acknowledged)
|
||||
|
@ -1287,9 +1283,9 @@ namespace stream
|
|||
m_CurrentOutboundTunnel = routingPath->outboundTunnel;
|
||||
m_CurrentRemoteLease = routingPath->remoteLease;
|
||||
m_RTT = routingPath->rtt;
|
||||
m_IsJavaClient = routingPath->isJava;
|
||||
if (m_IsJavaClient) m_MaxWindowSize = 32;
|
||||
}
|
||||
m_IsJavaClient = m_RoutingSession->IsWithJava ();
|
||||
if (m_IsJavaClient) m_MaxWindowSize = 32;
|
||||
}
|
||||
|
||||
auto ts = i2p::util::GetMillisecondsSinceEpoch ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue