Struct quinn::Connecting[][src]

pub struct Connecting(_);

In-progress connection attempt future

Be sure to spawn the ConnectionDriver when complete.

Implementations

impl Connecting[src]

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

Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security. Be sure to spawn the ConnectionDriver.

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.

impl Connecting[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 Future for Connecting[src]

type Output = Result<NewConnection, ConnectionError>

The type of value produced on completion.

Auto Trait Implementations

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

impl<T> Instrument for T[src]

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

impl<F> IntoFuture for F where
    F: Future
[src]

type Output = <F as Future>::Output

🔬 This is a nightly-only experimental API. (into_future)

The output that the future will produce on completion.

type Future = F

🔬 This is a nightly-only experimental API. (into_future)

Which kind of future are we turning this into?

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

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

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