Skip to content

refactor(server)!: pass a DisplayContext to RdpServerDisplay::updates - #2073

Draft
uchouT (uchouT) wants to merge 4 commits into
Devolutions:masterfrom
uchouT:server-display
Draft

uchouT (uchouT) wants to merge 4 commits into
Devolutions:masterfrom
uchouT:server-display

Conversation

@uchouT

Copy link
Copy Markdown
Contributor

Second step of #1978, stacked on #2059.

RdpServerDisplay::updates() now takes a DisplayContext with the connection's display_suppressed flag and auto-detect handles. Each connection creates its own, replacing the manual resets at connection start. After a Deactivation-Reactivation Sequence, updates() is called again with the same handles.

Breaking: the RdpServerBuilder::with_*_handle methods and RdpServer::*_handle() accessors for these handles are removed.

cc Greg Lamberson (@glamberson) does this signature fit your lamco-rdp-server?

The connection state now lives in a `ConnectionState` created in
`finalize_negotiated`, which both entry paths reach, and passed down to
everything that serves the connection. It is dropped when the connection
ends.

BREAKING CHANGE: `RdpServer::get_svc_processor`, `RdpServer::
get_channel_id_by_type` and `RdpServer::rtt_snapshot` are removed.
`RdpServer` can only be borrowed from outside between connections, when
the first two found no channels and the last returned the previous
connection's figures. Auto-detect results are available through
`RdpServer::autodetect_rtt_handle`, `autodetect_baseline_rtt_handle` and
`autodetect_bandwidth_handle`.

Signed-off-by: uchouT <i@uchout.moe>
Signed-off-by: uchouT <i@uchout.moe>
The display suppression flag and the auto-detect handles describe one
connection, but were created with the server and reset by hand at the
start of each connection. Each connection now creates its own and hands
them to the display backend through `updates()`, which is called again
with the same handles after a Deactivation-Reactivation Sequence.

BREAKING CHANGE: `RdpServerDisplay::updates` takes a `DisplayContext`.
`RdpServer::display_suppressed_handle`, `autodetect_rtt_handle`,
`autodetect_baseline_rtt_handle`, `autodetect_bandwidth_handle`,
`autodetect_bandwidth_generation_handle` and the matching
`RdpServerBuilder::with_*_handle` methods are removed; read the handles
from the `DisplayContext` instead.

Signed-off-by: uchouT <i@uchout.moe>
Signed-off-by: uchouT <i@uchout.moe>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant