pub struct DtlsStack<'a, const CONNECTIONS: usize> { /* private fields */ }Implementations§
Source§impl<'a, const CONNECTIONS: usize> DtlsStack<'a, CONNECTIONS>
impl<'a, const CONNECTIONS: usize> DtlsStack<'a, CONNECTIONS>
pub fn new( rng: &'a mut dyn CryptoRngCore, staging_buffer: &'a mut [u8], send_to_peer: &'a mut dyn FnMut(&SocketAddr, &[u8]), ) -> Result<Self, DtlsError>
pub fn poll( &mut self, handshakes: &mut [HandshakeSlot<'_>], now_ms: u64, ) -> Result<DtlsPoll, DtlsError>
pub fn open_connection( &mut self, slot: &mut HandshakeSlot<'_>, addr: &SocketAddr, ) -> bool
Sourcepub fn close_connection(&mut self, connection_id: ConnectionId) -> bool
pub fn close_connection(&mut self, connection_id: ConnectionId) -> bool
Returns whether the connection was closed successfully
pub fn send_dtls_packet( &mut self, connection_id: ConnectionId, packet: &[u8], ) -> Result<(), DtlsError>
pub fn staging_buffer(&mut self) -> &mut [u8]
pub fn handle_dtls_packet( &mut self, handshakes: &mut [HandshakeSlot<'_>], addr: &SocketAddr, packet_len: usize, handle_app_data: &mut dyn FnMut(ConnectionId, Range<usize>, &mut Self), ) -> Result<(), DtlsError>
Auto Trait Implementations§
impl<'a, const CONNECTIONS: usize> Freeze for DtlsStack<'a, CONNECTIONS>
impl<'a, const CONNECTIONS: usize> !RefUnwindSafe for DtlsStack<'a, CONNECTIONS>
impl<'a, const CONNECTIONS: usize> !Send for DtlsStack<'a, CONNECTIONS>
impl<'a, const CONNECTIONS: usize> !Sync for DtlsStack<'a, CONNECTIONS>
impl<'a, const CONNECTIONS: usize> Unpin for DtlsStack<'a, CONNECTIONS>
impl<'a, const CONNECTIONS: usize> !UnwindSafe for DtlsStack<'a, CONNECTIONS>
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