Implement server-side downgrade from udp

This commit is contained in:
Lauri Kasanen
2022-10-03 14:54:40 +03:00
parent 6c0eff0828
commit 582740b3d8
12 changed files with 47 additions and 12 deletions

View File

@@ -40,7 +40,7 @@ void TightEncoder::writeMonoRect(int width, int height,
os = conn->getOutStream(conn->cp.supportsUdp);
if (conn->cp.supportsUdp)
if (conn->cp.supportsUdp || zlibNeedsReset)
os->writeU8(((streamId | tightExplicitFilter) << 4) | (1 << streamId));
else
os->writeU8((streamId | tightExplicitFilter) << 4);
@@ -130,7 +130,7 @@ void TightEncoder::writeIndexedRect(int width, int height,
os = conn->getOutStream(conn->cp.supportsUdp);
if (conn->cp.supportsUdp)
if (conn->cp.supportsUdp || zlibNeedsReset)
os->writeU8(((streamId | tightExplicitFilter) << 4) | (1 << streamId));
else
os->writeU8((streamId | tightExplicitFilter) << 4);