[−][src]Struct rdp::core::global::Client
Methods
impl Client
[src]
pub fn new(
user_id: u16,
channel_id: u16,
width: u16,
height: u16,
layout: KeyboardLayout,
name: &str
) -> Client
[src]
user_id: u16,
channel_id: u16,
width: u16,
height: u16,
layout: KeyboardLayout,
name: &str
) -> Client
Ctor for a new global channel client user_id and channel_id must come from mcs channel once connected Width and height are screen size
Example
ⓘThis example is not tested
use rdp::core::global; use rdp::core::gcc::KeyboardLayout; let mut global_channel = global::Client::new( mcs.get_user_id(), mcs.get_global_channel_id(), 800, 600, KeyboardLayout::US, "mstsc-rs" );
pub fn write_input_event<S: Read + Write>(
&self,
event: TSInputEvent,
mcs: &mut Client<S>
) -> RdpResult<()>
[src]
&self,
event: TSInputEvent,
mcs: &mut Client<S>
) -> RdpResult<()>
Public interface to sent input event
Example
ⓘThis example is not tested
let mut mcs = mcs::Client::new(...); let mut global = global::Global::new(...); global.write_input_event( ts_pointer_event( Some(flags), Some(x), Some(y) ), &mut mcs ) global.write_input_event( ts_keyboard_event( Some(flags), Some(code) ), &mut self.mcs )
pub fn read<S: Read + Write, T>(
&mut self,
payload: Payload,
mcs: &mut Client<S>,
callback: T
) -> RdpResult<()> where
T: FnMut(RdpEvent),
[src]
&mut self,
payload: Payload,
mcs: &mut Client<S>,
callback: T
) -> RdpResult<()> where
T: FnMut(RdpEvent),
Read payload on global channel This is the main read function for global channel
Example
ⓘThis example is not tested
let mut mcs = mcs::Client::new(...); let mut global = global::Global::new(...); let (channel_name, message) = mcs.read().unwrap(); match channel_name.as_str() { "global" => global.read(message, &mut mcs, |event| { // do something with event }), ... }
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl !Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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>,