Struct webrtc_ice::udp_mux::UDPMuxConn
source · pub struct UDPMuxConn { /* private fields */ }
Expand description
A UDP mux connection.
Implementations§
source§impl UDPMuxConn
impl UDPMuxConn
sourcepub fn new(params: UDPMuxConnParams) -> Self
pub fn new(params: UDPMuxConnParams) -> Self
Creates a new UDPMuxConn
.
sourcepub async fn write_packet(
&self,
data: &[u8],
addr: SocketAddr
) -> Result<(), Error>
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.
sourcepub fn close_rx(&self) -> Receiver<bool>
pub fn close_rx(&self) -> Receiver<bool>
Gets a copy of the close tokio::sync::watch::Receiver
that fires when this
connection is closed.
sourcepub fn get_addresses(&self) -> Vec<SocketAddr>
pub fn get_addresses(&self) -> Vec<SocketAddr>
Gets the list of the addresses associated with this connection.
sourcepub async fn add_address(&self, addr: SocketAddr)
pub async fn add_address(&self, addr: SocketAddr)
Registers a new address for this connection.
sourcepub fn remove_address(&self, addr: &SocketAddr)
pub fn remove_address(&self, addr: &SocketAddr)
Deregisters an address.
sourcepub fn contains_address(&self, addr: &SocketAddr) -> bool
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
impl Clone for UDPMuxConn
source§fn clone(&self) -> UDPMuxConn
fn clone(&self) -> UDPMuxConn
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more