pub struct TurnClientOpensslTls { /* private fields */ }Expand description
A TURN client that communicates over TLS.
Implementations§
Source§impl TurnClientOpensslTls
impl TurnClientOpensslTls
Sourcepub fn allocate(
transport: TransportType,
local_addr: SocketAddr,
remote_addr: SocketAddr,
config: TurnConfig,
ssl_context: SslContext,
) -> Self
pub fn allocate( transport: TransportType, local_addr: SocketAddr, remote_addr: SocketAddr, config: TurnConfig, ssl_context: SslContext, ) -> Self
Allocate an address on a TURN server to relay data to and from peers.
Trait Implementations§
Source§impl Debug for TurnClientOpensslTls
impl Debug for TurnClientOpensslTls
Source§impl TurnClientApi for TurnClientOpensslTls
impl TurnClientApi for TurnClientOpensslTls
Source§fn transport(&self) -> TransportType
fn transport(&self) -> TransportType
The transport of the connection to the TURN server.
Source§fn local_addr(&self) -> SocketAddr
fn local_addr(&self) -> SocketAddr
The local address of this TURN client.
Source§fn remote_addr(&self) -> SocketAddr
fn remote_addr(&self) -> SocketAddr
The remote TURN server’s address.
Source§fn poll(&mut self, now: Instant) -> TurnPollRet
fn poll(&mut self, now: Instant) -> TurnPollRet
Poll the client for further progress.
Source§fn relayed_addresses(
&self,
) -> impl Iterator<Item = (TransportType, SocketAddr)> + '_
fn relayed_addresses( &self, ) -> impl Iterator<Item = (TransportType, SocketAddr)> + '_
The list of allocated relayed addresses on the TURN server.
Source§fn permissions(
&self,
transport: TransportType,
relayed: SocketAddr,
) -> impl Iterator<Item = IpAddr> + '_
fn permissions( &self, transport: TransportType, relayed: SocketAddr, ) -> impl Iterator<Item = IpAddr> + '_
The list of permissions available for the provided relayed address.
Source§fn poll_transmit(&mut self, now: Instant) -> Option<Transmit<Data<'static>>>
fn poll_transmit(&mut self, now: Instant) -> Option<Transmit<Data<'static>>>
Poll for a packet to send.
Source§fn poll_event(&mut self) -> Option<TurnEvent>
fn poll_event(&mut self) -> Option<TurnEvent>
Poll for an event that has occurred.
Source§fn delete(&mut self, now: Instant) -> Result<(), DeleteError>
fn delete(&mut self, now: Instant) -> Result<(), DeleteError>
Remove the allocation/s on the server.
Source§fn create_permission(
&mut self,
transport: TransportType,
peer_addr: IpAddr,
now: Instant,
) -> Result<(), CreatePermissionError>
fn create_permission( &mut self, transport: TransportType, peer_addr: IpAddr, now: Instant, ) -> Result<(), CreatePermissionError>
Create a permission address to allow sending/receiving data to/from.
Source§fn have_permission(&self, transport: TransportType, to: IpAddr) -> bool
fn have_permission(&self, transport: TransportType, to: IpAddr) -> bool
Whether the client currently has a permission installed for the provided transport and
address.
Source§fn bind_channel(
&mut self,
transport: TransportType,
peer_addr: SocketAddr,
now: Instant,
) -> Result<(), BindChannelError>
fn bind_channel( &mut self, transport: TransportType, peer_addr: SocketAddr, now: Instant, ) -> Result<(), BindChannelError>
Bind a channel for sending/receiving data to/from a particular peer.
Source§fn tcp_connect(
&mut self,
peer_addr: SocketAddr,
now: Instant,
) -> Result<(), TcpConnectError>
fn tcp_connect( &mut self, peer_addr: SocketAddr, now: Instant, ) -> Result<(), TcpConnectError>
Attempt to connect to a peer from the TURN server using TCP. Read more
Source§fn allocated_tcp_socket(
&mut self,
id: u32,
five_tuple: Socket5Tuple,
peer_addr: SocketAddr,
local_addr: Option<SocketAddr>,
now: Instant,
) -> Result<(), TcpAllocateError>
fn allocated_tcp_socket( &mut self, id: u32, five_tuple: Socket5Tuple, peer_addr: SocketAddr, local_addr: Option<SocketAddr>, now: Instant, ) -> Result<(), TcpAllocateError>
Indicate success (or failure) to create a socket for the specified server and peer address. Read more
Source§fn tcp_closed(
&mut self,
local_addr: SocketAddr,
remote_addr: SocketAddr,
now: Instant,
)
fn tcp_closed( &mut self, local_addr: SocketAddr, remote_addr: SocketAddr, now: Instant, )
Indicate that the TCP connection has been closed.
Source§fn send_to<T: AsRef<[u8]> + Debug>(
&mut self,
transport: TransportType,
to: SocketAddr,
data: T,
now: Instant,
) -> Result<Option<TransmitBuild<DelayedMessageOrChannelSend<T>>>, SendError>
fn send_to<T: AsRef<[u8]> + Debug>( &mut self, transport: TransportType, to: SocketAddr, data: T, now: Instant, ) -> Result<Option<TransmitBuild<DelayedMessageOrChannelSend<T>>>, SendError>
Send data to a peer through the TURN server. Read more
Source§fn recv<T: AsRef<[u8]> + Debug>(
&mut self,
transmit: Transmit<T>,
now: Instant,
) -> TurnRecvRet<T>
fn recv<T: AsRef<[u8]> + Debug>( &mut self, transmit: Transmit<T>, now: Instant, ) -> TurnRecvRet<T>
Provide received data to the TURN client for handling. Read more
Source§fn poll_recv(&mut self, now: Instant) -> Option<TurnPeerData<Vec<u8>>>
fn poll_recv(&mut self, now: Instant) -> Option<TurnPeerData<Vec<u8>>>
Poll the client for any further received data.
Source§fn protocol_error(&mut self)
fn protocol_error(&mut self)
A higher layer has encountered an error and this client is no longer usable.
Auto Trait Implementations§
impl Freeze for TurnClientOpensslTls
impl !RefUnwindSafe for TurnClientOpensslTls
impl Send for TurnClientOpensslTls
impl Sync for TurnClientOpensslTls
impl Unpin for TurnClientOpensslTls
impl UnsafeUnpin for TurnClientOpensslTls
impl !UnwindSafe for TurnClientOpensslTls
Blanket Implementations§
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