pub struct AdapterHandle { /* private fields */ }Expand description
A cloneable, thread-safe handle to a background crate::tcp::adapter::Adapter task.
Constructed via crate::tcp::adapter::Adapter::to_async_handle. Cheap to clone.
Each clone shares the same channel sender to the background task.
Drop all clones (or call AdapterHandle::close) to shut down the background task.
Implementations§
Source§impl AdapterHandle
impl AdapterHandle
pub fn new(adapter: Adapter) -> Self
Sourcepub fn host_ip(&self) -> IpAddr
pub fn host_ip(&self) -> IpAddr
The local (host) IP of the tunnel — use this as the RTP receiverIP.
Sourcepub async fn bind_udp(&self, port: u16) -> Result<UdpSocketHandle, Error>
pub async fn bind_udp(&self, port: u16) -> Result<UdpSocketHandle, Error>
Bind a local UDP port for connectionless send/receive. Pass 0 to let
the stack choose a free port (returned in UdpSocketHandle::local_port).
pub async fn connect(&mut self, port: u16) -> Result<StreamHandle, Error>
pub async fn pcap(&mut self, path: impl Into<PathBuf>) -> Result<(), Error>
pub async fn close(&mut self) -> Result<(), Error>
Trait Implementations§
Source§impl Clone for AdapterHandle
impl Clone for AdapterHandle
Source§impl Debug for AdapterHandle
impl Debug for AdapterHandle
Source§impl RsdProvider for AdapterHandle
idevice opens every service through this: RSD, the accessibility service,
DVT and the rest connect over the tunnel by port.
impl RsdProvider for AdapterHandle
idevice opens every service through this: RSD, the accessibility service, DVT and the rest connect over the tunnel by port.
async fn connect_to_service_port( &mut self, port: u16, ) -> Result<Box<dyn ReadWrite>, IdeviceError>
Auto Trait Implementations§
impl Forget for AdapterHandle
impl Freeze for AdapterHandle
impl Move for AdapterHandle
impl RefUnwindSafe for AdapterHandle
impl Send for AdapterHandle
impl Sync for AdapterHandle
impl Unpin for AdapterHandle
impl UnsafeUnpin for AdapterHandle
impl UnwindSafe for AdapterHandle
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