fn handle_monitor_ready(&self, _payload: &mut Payload) -> RdpResult<Vec<Vec<u8>>> {
        // There's nothing additional to decode here, the monitor ready PDU is just a header.
        // In response, we need to:
        // 1. Send our clipboard capabilities
        // 2. Mimic a "copy" operation by sending a format list PDU
        // This completes the initialization process.

        let result = vec![
            encode_message(
                ClipboardPDUType::CB_CLIP_CAPS,
                ClipboardCapabilitiesPDU {
                    general: Some(GeneralClipboardCapabilitySet {
                        version: CB_CAPS_VERSION_2,
                        flags: ClipboardGeneralCapabilityFlags::CB_USE_LONG_FORMAT_NAMES,
                    }),
                }
                .encode()?,
            )?,
            encode_message(
                ClipboardPDUType::CB_FORMAT_LIST,
                FormatListPDU::<LongFormatName> {
                    format_names: vec![LongFormatName::id(0)],
                }
                .encode()?,
            )?,
        ];

        Ok(result)
    }
/// Handles the monitor ready PDU, which is sent from the server to the client during
/// the initialization phase. Upon receiving this message, the client should respond
/// with its capabilities, an optional temporary directory PDU, and a format list PDU.
Handles the monitor ready PDU, which is sent from the server to the client during
the initialization phase. Upon receiving this message, the client should respond
with its capabilities, an optional temporary directory PDU, and a format list PDU.
Handles the monitor ready PDU which is sent from the server to the client during the initialization phase . Upon receiving this message the client should respond with its capabilities an optional temporary directory PDU and a format list PDU .
fn handle_monitor_ready(&self, _payload: &mut Payload) -> RdpResult<Vec<Vec<u8>>> {
        // There's nothing additional to decode here, the monitor ready PDU is just a header.
        // In response, we need to:
        // 1. Send our clipboard capabilities
        // 2. Mimic a "copy" operation by sending a format list PDU
        // This completes the initialization process.
        let result = vec![
            encode_message(
                ClipboardPDUType::CB_CLIP_CAPS,
                ClipboardCapabilitiesPDU {
                    general: Some(GeneralClipboardCapabilitySet {
                        version: CB_CAPS_VERSION_2,
                        flags: ClipboardGeneralCapabilityFlags::CB_USE_LONG_FORMAT_NAMES,
                    }),
                }
                .encode()?,
            )?,
            encode_message(
                ClipboardPDUType::CB_FORMAT_LIST,
                FormatListPDU::<LongFormatName> {
                    format_names: vec![LongFormatName::id(0)],
                }
                .encode()?,
            )?,
        ];
        Ok(result)
    }
fn handle_monitor_ready ( & self , _payload : & mut Payload ) -> RdpResult < Vec < Vec < u8 > > > { // There's nothing additional to decode here, the monitor ready PDU is just a header. // In response, we need to: // 1. Send our clipboard capabilities // 2. Mimic a "copy" operation by sending a format list PDU // This completes the initialization process. let result = vec ! [ encode_message ( ClipboardPDUType CB_CLIP_CAPS ClipboardCapabilitiesPDU { general Some ( GeneralClipboardCapabilitySet { version CB_CAPS_VERSION_2 flags ClipboardGeneralCapabilityFlags CB_USE_LONG_FORMAT_NAMES } ) } encode ( ) ) encode_message ( ClipboardPDUType CB_FORMAT_LIST FormatListPDU LongFormatName { format_names vec [ LongFormatName id ( 0 ) ] } encode ( ) ) ] ; Ok ( result ) }
Handles the monitor ready PDU, which is sent from the server to the client during
the initialization phase.
Handles the monitor ready PDU which is sent from the server to the client during the initialization phase .
&self
_payload
&mut Payload
&self
_payload
&mut Payload