Struct webrtc_dtls::conn::DTLSConn
source · pub struct DTLSConn { /* private fields */ }
Implementations§
source§impl DTLSConn
impl DTLSConn
pub async fn new( conn: Arc<dyn Conn + Send + Sync>, config: Config, is_client: bool, initial_state: Option<State> ) -> Result<Self, Error>
pub async fn read( &self, p: &mut [u8], duration: Option<Duration> ) -> Result<usize, Error>
pub async fn write( &self, p: &[u8], duration: Option<Duration> ) -> Result<usize, Error>
pub async fn close(&self) -> Result<(), Error>
sourcepub async fn connection_state(&self) -> State
pub async fn connection_state(&self) -> State
connection_state returns basic DTLS details about the connection.
Note that this replaced the Export
function of v1.
sourcepub fn selected_srtpprotection_profile(&self) -> SrtpProtectionProfile
pub fn selected_srtpprotection_profile(&self) -> SrtpProtectionProfile
selected_srtpprotection_profile returns the selected SRTPProtectionProfile
Trait Implementations§
source§impl Conn for DTLSConn
impl Conn for DTLSConn
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,
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,
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,
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,
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,
fn local_addr(&self) -> Result<SocketAddr, Error>
fn remote_addr(&self) -> Option<SocketAddr>
fn close<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn as_any(&self) -> &(dyn Any + Send + Sync)
Auto Trait Implementations§
impl !Freeze for DTLSConn
impl !RefUnwindSafe for DTLSConn
impl Send for DTLSConn
impl Sync for DTLSConn
impl Unpin for DTLSConn
impl !UnwindSafe for DTLSConn
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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