pub struct ReceiveTraffic<Side: SideData> { /* private fields */ }Expand description
The receive-side of a connection, after a successful handshake.
You can use this object to receive data from the peer.
Implementations§
Source§impl<Side: SideData> ReceiveTraffic<Side>
impl<Side: SideData> ReceiveTraffic<Side>
Sourcepub fn read<'a>(
self,
input: &'a mut impl TlsInputBuffer,
) -> Result<ReceiveTrafficState<'a, Side>, ErrorWithAlert>
pub fn read<'a>( self, input: &'a mut impl TlsInputBuffer, ) -> Result<ReceiveTrafficState<'a, Side>, ErrorWithAlert>
Receive application data from the peer.
received_tls is an instance of the receive buffer abstraction containing
TLS-protected data received from the peer.
A ReceiveTrafficState is returned on success.
An error from this function permanently breaks the ability to receive
data from the peer. The error may be accompanied by a TLS alert,
which can be obtained from the returned ErrorWithAlert and sent
to the peer. Following this, the underlying IO medium should be
closed by the application.
Source§impl ReceiveTraffic<ClientSide>
impl ReceiveTraffic<ClientSide>
Sourcepub fn tls13_tickets_received(&self) -> u32
pub fn tls13_tickets_received(&self) -> u32
Returns the number of TLS1.3 tickets that have been received.
Trait Implementations§
Auto Trait Implementations§
impl<Side> !RefUnwindSafe for ReceiveTraffic<Side>
impl<Side> !UnwindSafe for ReceiveTraffic<Side>
impl<Side> Freeze for ReceiveTraffic<Side>where
<Side as Side>::State: Freeze,
impl<Side> Send for ReceiveTraffic<Side>where
<Side as Side>::State: Send,
impl<Side> Sync for ReceiveTraffic<Side>where
<Side as Side>::State: Sync,
impl<Side> Unpin for ReceiveTraffic<Side>where
<Side as Side>::State: Unpin,
impl<Side> UnsafeUnpin for ReceiveTraffic<Side>where
<Side as Side>::State: UnsafeUnpin,
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