Skip to main content

ReceiveTraffic

Struct ReceiveTraffic 

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

Source

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>

Source

pub fn tls13_tickets_received(&self) -> u32

Returns the number of TLS1.3 tickets that have been received.

Trait Implementations§

Source§

impl<Side: SideData> Debug for ReceiveTraffic<Side>

Source§

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

Formats the value using the given formatter. Read more

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