Version: 0.6.0
Docs.rs: ironrdp-svc
Docs.rs: ironrdp-svc
Overview
Theironrdp-svc crate provides traits and utilities for implementing RDP Static Virtual Channels (SVCs). Static channels are:
- Established during connection setup (up to 31 custom channels)
- Lossless, ordered byte streams
- Used for clipboard, file transfer, audio, device redirection, etc.
- PDU chunkification (splitting large messages into ~1600 byte chunks)
- Channel framing headers
- MCS/X.224 wrapping
Core Traits
SvcProcessor
fn(&self) -> ChannelName
Returns the 7-character channel name (e.g., “CLIPRDR”, “RDPDR”)
fn(&self) -> CompressionCondition
Defines when channel data should be compressed (default: Never)
fn(&mut self) -> PduResult<Vec<SvcMessage>>
Called after the channel is joined. Returns initial PDUs to send (default: empty)
fn(&mut self, payload: &[u8]) -> PduResult<Vec<SvcMessage>>
Process a received PDU (fully de-chunkified). Returns response PDUs to send.
SvcClientProcessor & SvcServerProcessor
Core Types
StaticVirtualChannel
SvcProcessor that handles chunking and framing.
SvcMessage
SvcEncode type.
SvcEncode
Encode.
Example:
StaticChannelSet
SvcProcessor type. Maps between:
- Type IDs (from
TypeId::of::<T>()) - Channel names
- Channel IDs (assigned by the server during connection)
CompressionCondition
Channel Encoding
Client-Side Encoding
- Chunkifying messages
- Adding Channel PDU Headers
- Wrapping in MCS Send Data Request
- Adding X.224 and TPKT framing
Server-Side Encoding
Channel Definitions
make_channel_definition
ChannelDef structure to advertise during connection negotiation.
Implementation Example
Usage Example
Channel Framing
ChannelFlags
FIRST and LAST are set automatically during chunkification.
Chunk Size
Re-exports
Usage Notes
Automatic Chunkification:
You don’t need to manually chunk messages.
You don’t need to manually chunk messages.
StaticVirtualChannel handles it:Type-Safe Channel Access:
UseNo string comparisons or manual casting needed.
Use
StaticChannelSet to safely manage multiple channels:Channel Limits:
RDP supports up to 31 custom static virtual channels plus the mandatory I/O channel (32 total). Choose channel names carefully.
RDP supports up to 31 custom static virtual channels plus the mandatory I/O channel (32 total). Choose channel names carefully.
See Also
- ironrdp-dvc - Dynamic virtual channels
- ironrdp-pdu - PDU structures
- ironrdp-connector - Connection setup
- MS-RDPBCGR §2.2.6 - Virtual channel specification

