Struct webrtc_ice::udp_mux::UDPMuxConn

source ·
pub struct UDPMuxConn { /* private fields */ }
Expand description

A UDP mux connection.

Implementations§

source§

impl UDPMuxConn

source

pub fn new(params: UDPMuxConnParams) -> Self

Creates a new UDPMuxConn.

source

pub fn key(&self) -> &str

Returns a key identifying this connection.

source

pub async fn write_packet( &self, data: &[u8], addr: SocketAddr ) -> Result<(), Error>

Writes data to the given address. Returns an error if the buffer is too short or there’s an encoding error.

source

pub fn is_closed(&self) -> bool

Returns true if this connection is closed.

source

pub fn close_rx(&self) -> Receiver<bool>

Gets a copy of the close tokio::sync::watch::Receiver that fires when this connection is closed.

source

pub fn close(&self)

Closes this connection.

source

pub fn get_addresses(&self) -> Vec<SocketAddr>

Gets the list of the addresses associated with this connection.

source

pub async fn add_address(&self, addr: SocketAddr)

Registers a new address for this connection.

source

pub fn remove_address(&self, addr: &SocketAddr)

Deregisters an address.

source

pub fn contains_address(&self, addr: &SocketAddr) -> bool

Returns true if the given address is associated with this connection.

Trait Implementations§

source§

impl Clone for UDPMuxConn

source§

fn clone(&self) -> UDPMuxConn

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Conn for UDPMuxConn

source§

fn connect<'life0, 'async_trait>( &'life0 self, _addr: SocketAddr ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn recv<'life0, 'life1, 'async_trait>( &'life0 self, _buf: &'life1 mut [u8] ) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn recv_from<'life0, 'life1, 'async_trait>( &'life0 self, buf: &'life1 mut [u8] ) -> Pin<Box<dyn Future<Output = Result<(usize, SocketAddr), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn send<'life0, 'life1, 'async_trait>( &'life0 self, _buf: &'life1 [u8] ) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn send_to<'life0, 'life1, 'async_trait>( &'life0 self, buf: &'life1 [u8], target: SocketAddr ) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn local_addr(&self) -> Result<SocketAddr, Error>

source§

fn remote_addr(&self) -> Option<SocketAddr>

source§

fn close<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn as_any(&self) -> &(dyn Any + Send + Sync)

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

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

source§

fn vzip(self) -> V