[−][src]Struct udp_dtls::DtlsAcceptor
Acceptor for incoming UDP sessions secured with DTLS.
Methods
impl DtlsAcceptor
[src]
pub fn default(identity: Identity) -> Result<DtlsAcceptor>
[src]
Creates a DtlsAcceptor
with default settings.
The identity acts as the server's private key/certificate chain.
pub fn new(builder: &DtlsAcceptorBuilder) -> Result<DtlsAcceptor>
[src]
Creates a acceptor with the settings from the given builder.
The DtlsAcceptor
will use the settings from the given builder.
The following properties will be applied from the builder:
- Sets minimal/maximal protocol version
- Sets srtp profile by enabling the DTLS extension 'use_srtp'
- Sets the certificate and private key
- Adds the certificates from the identity chain to the certificate chain.
pub fn builder(identity: Identity) -> DtlsAcceptorBuilder
[src]
Returns a new builder for a DtlsAcceptor
.
The identity acts as the server's private key/certificate chain.
pub fn accept<S>(&self, stream: S) -> Result<DtlsStream<S>, HandshakeError<S>> where
S: Read + Write,
[src]
S: Read + Write,
Accepts a new client connection with the provided stream.
If the socket is nonblocking and a WouldBlock
error is returned during
the handshake, a HandshakeError::WouldBlock
error will be returned
which can be used to restart the handshake when the socket is ready
again.
Trait Implementations
impl Clone for DtlsAcceptor
[src]
fn clone(&self) -> DtlsAcceptor
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl Send for DtlsAcceptor
impl Sync for DtlsAcceptor
impl Unpin for DtlsAcceptor
impl UnwindSafe for DtlsAcceptor
impl RefUnwindSafe for DtlsAcceptor
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
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<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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,