Skip to content

fix(server)!: pass a GfxContext to the GfxServerFactory build methods - #2104

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

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

Conversation

@uchouT

Copy link
Copy Markdown
Contributor

Follow-up to #2073, stack on it.

Initial discussion: #2073 (comment)

Channel backends are now built in finalize_negotiated, once a connection has authenticated, together with its ConnectionState. GfxServerFactory's build methods take a GfxContext carrying the same auto-detect handles the display gets, and the connection's EGFX server reaches the display through DisplayContext::gfx_handle, replacing RdpServer::gfx_handle().

Breaking: the GfxServerFactory signatures change, RdpServer::gfx_handle() is removed, and factories are no longer invoked for a connection that ends before negotiation and authentication complete.

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>
Signed-off-by: uchouT <i@uchout.moe>
The EGFX backend needs the connection's auto-detect handles for flow
control, but could only get them sideways through the display. Channel
backends are now built once the connection has authenticated, together
with its state, so the build methods can be handed the same handles the
display gets. The connection's EGFX server reaches the display through
`DisplayContext`.

BREAKING CHANGE: `GfxServerFactory::build_gfx_handler` and
`build_server_with_handle` take a `GfxContext`. `RdpServer::gfx_handle`
is removed; use `DisplayContext::gfx_handle` instead. Channel factories
are no longer invoked for a connection that ends before negotiation and
authentication complete.

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