Skip to main content

handshake

Function handshake 

Source
pub async fn handshake(
    reader: &mut FramedReader<PeerNetMsgCodec>,
    writer: &mut FramedWriter<PeerNetMsgCodec>,
    p: &HandshakeParams<'_>,
) -> Result<(PeerID, Vec<ProtocolID>)>
Expand description

Run the handshake on split reader/writer. Returns the remote peer ID and the set of protocols both sides support.