pub struct OpensslTurnServer { /* private fields */ }openssl only.Expand description
A TURN server that can handle TLS connections.
Implementations§
Source§impl OpensslTurnServer
impl OpensslTurnServer
Sourcepub fn new(
transport: TransportType,
listen_addr: SocketAddr,
realm: String,
ssl_context: SslContext,
) -> Self
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
impl Debug for OpensslTurnServer
Source§impl TurnServerApi for OpensslTurnServer
impl TurnServerApi for OpensslTurnServer
Source§fn add_user(&mut self, username: String, password: String)
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
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)
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>>>
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
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>>>
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,
)
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.