pub struct Client<S> { /* private fields */ }
Expand description
MCS client channel
Implementations§
Source§impl<S: Read + Write> Client<S>
impl<S: Read + Write> Client<S>
pub fn new(x224: Client<S>) -> Self
Sourcepub fn connect(
&mut self,
client_name: String,
screen_width: u16,
screen_height: u16,
keyboard_layout: KeyboardLayout,
) -> RdpResult<()>
pub fn connect( &mut self, client_name: String, screen_width: u16, screen_height: u16, keyboard_layout: KeyboardLayout, ) -> RdpResult<()>
Sourcepub fn write<T>(&mut self, channel_name: &String, message: T) -> RdpResult<()>where
T: Message + 'static,
pub fn write<T>(&mut self, channel_name: &String, message: T) -> RdpResult<()>where
T: Message + 'static,
Sourcepub fn read(&mut self) -> RdpResult<(String, Payload)>
pub fn read(&mut self) -> RdpResult<(String, Payload)>
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
ⓘ
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");
...
}
Sourcepub fn is_rdp_version_5_plus(&self) -> bool
pub fn is_rdp_version_5_plus(&self) -> bool
This function check if the client version protocol choose is 5+
Sourcepub fn get_user_id(&self) -> u16
pub fn get_user_id(&self) -> u16
Getter of the user id negotiated during connection steps
Sourcepub fn get_global_channel_id(&self) -> u16
pub fn get_global_channel_id(&self) -> u16
Getter of the global channel id
Auto Trait Implementations§
impl<S> Freeze for Client<S>where
S: Freeze,
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more