pub trait OutboundUpgrade<C>: UpgradeInfo {
    type Output;
    type Error;
    type Future: Future<Output = Result<Self::Output, Self::Error>>;

    fn upgrade_outbound(self, socket: C, info: Self::Info) -> Self::Future;
}
Expand description

Possible upgrade on an outbound connection or substream.

Required Associated Types§

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

Possible error during the handshake.

Future that performs the handshake with the remote.

Required Methods§

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§

Implements the initiator part of the IK handshake pattern.

IK is a single round-trip (2 messages) handshake.

In the IK handshake, the initiator knows and pre-configures the remote’s identity in the HandshakeState.

initiator -{id}-> responder
initiator <-{id}- responder

Implements the initiator part of the IX noise handshake pattern.

IX is a single round-trip (2 messages) handshake in which each party sends their identity over to the other party.

initiator -{id}-> responder
initiator <-{id}- responder

Implements the initiator part of the XX noise handshake pattern.

XX is a 1.5 round-trip (3 messages) handshake. The first message in a noise handshake is unencrypted. In the XX handshake pattern, that message is empty and thus does not leak any information. The identities are then exchanged in the second and third message.

initiator --{}--> responder
initiator <-{id}- responder
initiator -{id}-> responder