Trait pea2pea::protocols::Handshake[][src]

pub trait Handshake: Pea2Pea where
    Self: Clone + Send + Sync + 'static, 
{ fn perform_handshake<'life0, 'async_trait>(
        &'life0 self,
        conn: Connection
    ) -> Pin<Box<dyn Future<Output = Result<Connection>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn enable_handshake(&self) { ... } }
Expand description

Can be used to specify and enable network handshakes. Upon establishing a connection, both sides will need to adhere to the specified handshake rules in order to finalize the connection and be able to send or receive any messages.

Required methods

Performs the handshake; temporarily assumes control of the Connection and returns it if the handshake is successful.

Provided methods

Prepares the node to perform specified network handshakes.

Implementors