[−][src]Struct rdp::core::mcs::Client
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]
&mut self,
client_name: String,
screen_width: u16,
screen_height: u16,
keyboard_layout: KeyboardLayout
) -> RdpResult<()>
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]
&mut self,
channel_name: &String,
message: T
) -> RdpResult<()> where
T: Message,
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,
S: RefUnwindSafe,
impl<S> Send for Client<S> where
S: Send,
S: Send,
impl<S> Sync for Client<S> where
S: Sync,
S: Sync,
impl<S> Unpin for Client<S> where
S: Unpin,
S: Unpin,
impl<S> UnwindSafe for Client<S> where
S: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,