refactor(server)!: pass a DisplayContext to RdpServerDisplay::updates - #2073
Draft
uchouT (uchouT) wants to merge 4 commits into
Draft
uchouT (uchouT) wants to merge 4 commits into
uchouT (uchouT) wants to merge 4 commits into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second step of #1978, stacked on #2059.
RdpServerDisplay::updates()now takes aDisplayContextwith the connection'sdisplay_suppressedflag 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_*_handlemethods andRdpServer::*_handle()accessors for these handles are removed.cc Greg Lamberson (@glamberson) does this signature fit your lamco-rdp-server?