[][src]Struct rdp::core::mcs::Client

pub struct Client<S> { /* fields omitted */ }

MCS client channel

Methods

impl<S: Read + Write> Client<S>[src]

pub fn new(x224: Client<S>) -> Self[src]

pub fn connect(
    &mut self,
    client_name: String,
    screen_width: u16,
    screen_height: u16,
    keyboard_layout: KeyboardLayout
) -> RdpResult<()>
[src]

Connect the MCS channel Ask connection for each channel requested and confirmed by server

Example

This example is not tested
let mut mcs = mcs::Client(x224);
mcs.connect(800, 600, KeyboardLayout::French).unwrap()

pub fn write<T: 'static>(
    &mut self,
    channel_name: &String,
    message: T
) -> RdpResult<()> where
    T: Message
[src]

Send a message to a connected channel MCS stand for multi channel Write function write a message to specific channel

Example

This example is not tested
let mut mcs = mcs::Client(x224);
mcs.connect(800, 600, KeyboardLayout::French).unwrap();
mcs.write("global".to_string(), trame![U16::LE(0)])

pub fn read(&mut self) -> RdpResult<(String, Payload)>[src]

Receive a message for a specific channel Actually by design you can't ask for a specific channel the caller need to handle all channels

Example

This example is not tested
let mut mcs = mcs::Client(x224);
mcs.connect(800, 600, KeyboardLayout::French).unwrap();
let (channel_name, payload) = mcs.read().unwrap();
match channel_name.as_str() {
    "global" => println!("main channel");
    ...
}

pub fn shutdown(&mut self) -> RdpResult<()>[src]

Send a close event to server

pub fn is_rdp_version_5_plus(&self) -> bool[src]

This function check if the client version protocol choose is 5+

pub fn get_user_id(&self) -> u16[src]

Getter of the user id negotiated during connection steps

pub fn get_global_channel_id(&self) -> u16[src]

Getter of the global channel id

Auto Trait Implementations

impl<S> RefUnwindSafe for Client<S> where
    S: RefUnwindSafe

impl<S> Send for Client<S> where
    S: Send

impl<S> Sync for Client<S> where
    S: Sync

impl<S> Unpin for Client<S> where
    S: Unpin

impl<S> UnwindSafe for Client<S> where
    S: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,