Skip to content

ironrdp-server: introduce a connection-scoped state struct #1978

Description

@uchouT

Connection-scoped state (static channels, DVC/USB routing, echo/autodetect bookkeeping, etc.) currently lives on RdpServer and is reset by hand between connections. That makes the state lifetime implicit. It is easy for state from a previous connection to leak into the next one, and it forces client_loop to share &mut RdpServer across select! branches.

On the RdpClient, ironrdp-session::ActiveStage already follows a cleaner model. I'd like to refactor ironrdp-server in the same direction:

  • move connection-scoped fields out of RdpServer into a struct created after acceptance and dropped at the end of the connection;
  • keep server-scoped state (config, handlers, factories) on RdpServer;
  • separate activation-scoped state so that deactivation/reactivation doesn't need to move the static channels through the acceptor.

This would also make #1512 easier to address later. And some other lifecycle mismatch problems can be fixed.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions