Trait libp2p::core::upgrade::InboundConnectionUpgrade

source ·
pub trait InboundConnectionUpgrade<T>: UpgradeInfo {
    type Output;
    type Error;
    type Future: Future<Output = Result<Self::Output, Self::Error>>;

    // Required method
    fn upgrade_inbound(self, socket: T, info: Self::Info) -> Self::Future;
}
Expand description

Possible upgrade on an inbound connection

Required Associated Types§

source

type Output

Output after the upgrade has been successfully negotiated and the handshake performed.

source

type Error

Possible error during the handshake.

source

type Future: Future<Output = Result<Self::Output, Self::Error>>

Future that performs the handshake with the remote.

Required Methods§

source

fn upgrade_inbound(self, socket: T, info: Self::Info) -> Self::Future

After we have determined that the remote supports one of the protocols we support, this method is called to start the handshake.

The info is the identifier of the protocol, as produced by protocol_info.

Implementors§

source§

impl<U, T> InboundConnectionUpgrade<T> for U
where U: InboundUpgrade<T>,

§

type Output = <U as InboundUpgrade<T>>::Output

§

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

§

type Future = <U as InboundUpgrade<T>>::Future