OpensslTurnServer

Struct OpensslTurnServer 

Source
pub struct OpensslTurnServer { /* private fields */ }
Available on crate feature openssl only.
Expand description

A TURN server that can handle TLS connections.

Implementations§

Source§

impl OpensslTurnServer

Source

pub fn new( transport: TransportType, listen_addr: SocketAddr, realm: String, ssl_context: SslContext, ) -> Self

Construct a now Turn server that can handle TLS connections.

Trait Implementations§

Source§

impl Debug for OpensslTurnServer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl TurnServerApi for OpensslTurnServer

Source§

fn add_user(&mut self, username: String, password: String)

Add a user credentials that would be accepted by this TurnServer.

Source§

fn listen_address(&self) -> SocketAddr

The address that the TurnServer is listening on for incoming client connections.

Source§

fn set_nonce_expiry_duration(&mut self, expiry_duration: Duration)

Set the amount of time that a Nonce (used for authentication) will expire and a new Nonce will need to be acquired by a client.

Source§

fn recv<T: AsRef<[u8]> + Debug>( &mut self, transmit: Transmit<T>, now: Instant, ) -> Option<TransmitBuild<DelayedMessageOrChannelSend<T>>>

Provide received data to the TurnServer.

Any returned Transmit should be forwarded to the appropriate socket.

Source§

fn poll(&mut self, now: Instant) -> TurnServerPollRet

Poll the TurnServer in order to make further progress.

The returned value indicates what the caller should do.

Source§

fn poll_transmit(&mut self, now: Instant) -> Option<Transmit<Vec<u8>>>

Poll for a new Transmit to send over a socket.

Source§

fn allocated_udp_socket( &mut self, transport: TransportType, local_addr: SocketAddr, remote_addr: SocketAddr, family: AddressFamily, socket_addr: Result<SocketAddr, SocketAllocateError>, now: Instant, )

Notify the TurnServer that a UDP socket has been allocated (or an error) in response to TurnServerPollRet::AllocateSocketUdp.

Source§

fn recv_icmp<T: AsRef<[u8]>>( &mut self, family: AddressFamily, bytes: T, now: Instant, ) -> Option<Transmit<Vec<u8>>>

Provide a received ICMP packet to the TurnServerApi. Read more

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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

Source§

type Output = T

Should always be Self
Source§

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

Source§

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>,

Source§

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

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more