Skip to content
Commit 4c646d45 authored by Pascal Nowack's avatar Pascal Nowack
Browse files

rdp: Add class for detecting network characteristics

Starting with Windows 8, Microsoft added a few PDUs, that allow the
server to detect network characteristics, such as the round trip time
(RTT) or the available bandwidth.
These characteristics are measured with the RTT
Measure-Request/-Response and Bandwidth Measure-Start/-Stop PDUs.

In order to make use of these PDUs, add a new class that hooks up to
these PDUs.
Currently, only RTT detection is implemented.

RTT detection works by putting a sequence number to a hash table,
saving the time for the sequence, sending an RTTRequest to the client
with the sequence number and when the client responds with the
RTTResponse, calculate the time difference between the response and the
request.
This RTT value will then be forwarded to a consumer, like the graphics
pipeline.
The graphics pipeline will forward the RTT value to the GFX surfaces,
which will then use that value to calculate the activate threshold for
the throttling mechanism.

To smooth out spikes in the RTT value, ignore out-of-order RTTResponses
and calculate the average RTT value from the RTTs of the last 500ms.
Also limit the maximum RTT value to 1000ms, as RTTs above that value
are extremely hard to handle, if they can be handled.

The ping interval will for now always be 70ms and the RTTRequsts will
only be sent, when there is an RTT consumer.
parent afe20213
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment