[][src]Struct quinn::generic::Connecting

pub struct Connecting<S> where
    S: Session
{ /* fields omitted */ }

In-progress connection attempt future

Methods

impl<S> Connecting<S> where
    S: Session
[src]

pub fn into_0rtt(self) -> Result<(NewConnection<S>, ZeroRttAccepted), Self>[src]

Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security

Opens up the connection for use before the handshake finishes, allowing the API user to send data with 0-RTT encryption if the necessary key material is available. This is useful for reducing start-up latency by beginning transmission of application data without waiting for the handshake's cryptographic security guarantees to be established.

When the ZeroRttAccepted future completes, the connection has been fully established.

Security

On outgoing connections, this enables transmission of 0-RTT data, which might be vulnerable to replay attacks, and should therefore never invoke non-idempotent operations.

On incoming connections, this enables transmission of 0.5-RTT data, which might be intercepted by a man-in-the-middle. If this occurs, the handshake will not complete successfully.

Errors

Outgoing connections are only 0-RTT-capable when a cryptographic session ticket cached from a previous connection to the same server is available, and includes a 0-RTT key. If no such ticket is found, self is returned unmodified.

For incoming connections, a 0.5-RTT connection will always be successfully constructed.

pub fn authentication_data(&self) -> S::AuthenticationData[src]

Data conveyed by the peer during the handshake, including cryptographic identity

Since the handshake is incomplete at this point, the returned data is likely to be incomplete as well.

impl<S> Connecting<S> where
    S: Session
[src]

pub fn remote_address(&self) -> SocketAddr[src]

The peer's UDP address.

Will panic if called after poll has returned Ready.

Trait Implementations

impl<S: Debug> Debug for Connecting<S> where
    S: Session
[src]

impl<S> Future for Connecting<S> where
    S: Session
[src]

type Output = Result<NewConnection<S>, ConnectionError>

The type of value produced on completion.

Auto Trait Implementations

impl<S> !RefUnwindSafe for Connecting<S>

impl<S> Send for Connecting<S> where
    <<S as Session>::Keys as Keys>::HeaderKeys: Send,
    <S as Session>::HmacKey: Send + Sync,
    <S as Session>::Keys: Send,
    <S as Session>::ServerConfig: Send + Sync

impl<S> Sync for Connecting<S> where
    <<S as Session>::Keys as Keys>::HeaderKeys: Send,
    <S as Session>::HmacKey: Send + Sync,
    <S as Session>::Keys: Send,
    <S as Session>::ServerConfig: Send + Sync

impl<S> Unpin for Connecting<S>

impl<S> !UnwindSafe for Connecting<S>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> FutureExt for T where
    T: Future + ?Sized
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<F, T, E> TryFuture for F where
    F: Future<Output = Result<T, E>> + ?Sized
[src]

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<Fut> TryFutureExt for Fut where
    Fut: TryFuture + ?Sized
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,