Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Devolutions/IronRDP/llms.txt
Use this file to discover all available pages before exploring further.
Version: 0.8.0
Docs.rs: ironrdp-session
Docs.rs: ironrdp-session
Overview
Theironrdp-session crate provides state machines for managing an active RDP session after the connection is established. It handles:
- Fast-path and X.224 PDU processing
- Graphics output (bitmaps, surface commands, RemoteFX)
- Pointer (cursor) updates
- Graceful disconnection
- Bulk data decompression
ironrdp-connector, this crate is transport-agnostic and operates on byte buffers.
Core Types
ActiveStage
MCS user channel ID from connection result
MCS I/O channel ID from connection result
If true, render pointer locally instead of using server-provided cursor
Use software rendering for pointer updates
Initial desktop dimensions
ActiveStageOutput
Graphics data was decoded into the
DecodedImageUse the default system pointer
Hide the pointer
Move pointer to (x, y)
Update pointer to a custom bitmap
Server requested graceful disconnection
GracefulDisconnectReason
Image Handling
DecodedImage Trait
BitmapRegion
PDU Processing Modules
Fast-Path
X.224
Legacy
Pointer
RemoteFX
Usage Example
Error Handling
Bulk Compression
The session automatically handles bulk decompression when the server sends compressed PDUs:- MPPC (8 KB or 64 KB history)
- NCRUSH (RDP 6.0)
- XCRUSH (RDP 6.1)
Config::compression_type in ironrdp-connector.
Features
Enable QOI image codec support
Enable QOI + Zstd compressed image support (requires
qoi)Dependencies
ironrdp-core- Core traits (public)ironrdp-pdu- PDU structures (public)ironrdp-graphics- Image processing (public)ironrdp-connector- Connection result types (public)ironrdp-svc- Virtual channel support (public)ironrdp-dvc- Dynamic virtual channels (public)ironrdp-bulk- Bulk decompressionironrdp-displaycontrol- Display control channel
Usage Notes
Image Ownership:
The
The
DecodedImage is owned by the caller. The session decodes graphics updates directly into your image buffer, avoiding unnecessary copies.PDU Framing:
The session expects complete PDUs (after TPKT/X.224/MCS unwrapping). Use
The session expects complete PDUs (after TPKT/X.224/MCS unwrapping). Use
ironrdp_pdu::find_size() to detect PDU boundaries in your framing layer.Output Buffer:
Reuse the
Reuse the
WriteBuf across calls:See Also
- ironrdp-connector - Connection establishment
- ironrdp-graphics - Graphics primitives
- ironrdp-input - Input event generation
- ironrdp-pdu - PDU structures
- Session Guide - High-level session management

