Skip to main content

Module handshake

Module handshake 

Source

Structsยง

HandshakeParams
Non-IO inputs to the handshake.
VerAckMsg
Acknowledges a Version message; ack=false means the responder rejected the proposed version/protocol mix.
VerMsg
Version-exchange message kicked off by the outbound side.

Functionsยง

handshake
Run the handshake on split reader/writer. Returns the remote peer ID and the set of protocols both sides support.
protocols_intersection ๐Ÿ”’
Compute the intersection of protocols both sides support with compatible versions. Returns the list of shared protocol IDs.
send_verack ๐Ÿ”’
Sends a Verack message.
send_vermsg ๐Ÿ”’
Sends a Version message.
validate_verack_msg ๐Ÿ”’
Validates the given verack msg.
validate_version_msg ๐Ÿ”’
Validates the given version msg. Returns the remote peer ID and the intersection of compatible protocols.

Type Aliasesยง

HandshakeWriter
Writer type for the handshake.
NegotiatedProtocols
Negotiated protocol set from a successful handshake.