Overview
ironrdp-acceptor provides state machines that drive the server-side RDP connection acceptance sequence. It handles the complex multi-phase negotiation and setup required to establish an RDP connection from the server perspective.
Key Features:
- Complete connection acceptance state machine
- Security protocol negotiation (TLS, Hybrid, Hybrid-EX)
- CredSSP authentication handling
- Channel connection management
- Capability exchange coordination
- Connection finalization
Installation
- Tokio async runtime
Core Concepts
Acceptor State Machine
TheAcceptor struct implements the Sequence trait and progresses through multiple states:
Connection Acceptance States
The acceptor progresses through these states:- InitiationWaitRequest - Wait for X.224 Connection Request
- InitiationSendConfirm - Send X.224 Connection Confirm
- SecurityUpgrade - Negotiate security protocol
- Credssp - Perform CredSSP authentication (if using Hybrid)
- BasicSettingsWaitInitial - Wait for MCS Connect Initial
- BasicSettingsSendResponse - Send MCS Connect Response
- ChannelConnection - Join MCS channels
- RdpSecurityCommencement - Begin RDP security
- SecureSettingsExchange - Exchange client info
- LicensingExchange - Send license packet
- CapabilitiesSendServer - Send Demand Active PDU
- MonitorLayoutSend - Send monitor layout (optional)
- CapabilitiesWaitConfirm - Wait for Confirm Active
- ConnectionFinalization - Finalize connection
- Accepted - Connection established
Usage
Basic Connection Acceptance
AcceptorResult
When the acceptor reaches theAccepted state, get_result() returns:
- static_channels: Negotiated static virtual channels
- capabilities: Client capability sets
- input_events: Queued input events from finalization
- user_channel_id: MCS user channel ID
- io_channel_id: MCS I/O channel ID
- reactivation: Whether this is a deactivation-reactivation sequence
Security Protocol Handling
No Security (RDP)
TLS Only
Hybrid (CredSSP + TLS)
Static Virtual Channels
Attach server-side channel processors before accepting connections:Deactivation-Reactivation
Handle display resize via deactivation-reactivation:CredSSP Authentication
The acceptor handles CredSSP (Credential Security Support Provider) for Hybrid and Hybrid-EX:Authentication Result
For Hybrid-EX, the acceptor automatically sends the Early User Authorization Result:- Success - Authentication successful
- AccessDenied - Authentication failed
State Inspection
Check Current State
State Transitions
Integration with ironrdp-server
Theironrdp-acceptor crate is typically used through ironrdp-server, which provides a higher-level API. However, you can use it directly for custom server implementations:
Error Handling
The acceptor returnsConnectorResult<T> which maps to ironrdp_connector::ConnectorError:
Advanced Features
Skip Channel Join
Clients supportingSUPPORT_SKIP_CHANNELJOIN can skip individual channel join sequences:
Monitor Layout
For clients supportingSUPPORT_MONITOR_LAYOUT_PDU:
Related Crates
ironrdp-server- High-level server implementationironrdp-connector- Shared connection types and traitsironrdp-pdu- RDP PDU encoding/decodingironrdp-svc- Static virtual channel supportironrdp-async- Async helpers and framing
See Also
- ironrdp-server Example - Full server implementation using acceptor
- RDP Connection Sequence - Microsoft documentation

