Module request_response::network

source ·
Expand description

The network traits. Is what we use to send and receive messages over the network as the protocol This file contains the Sender and Receiver traits. These traits are used by the [RequestResponseProtocol] to send and receive messages from a network or other source.

For HotShot I’ve gone ahead and done a blanket implementation for a Sender for all [ConnectedNetwork]s. The reason it’s not done for the Receiver is because both HS and the confirmation layer will receive messages from a single point and then decide what to do with them (as opposed to having some sort of filtering mechanism). So for Receiver I’ve done a blanket implementation for channels that send Vec<u8>s.

Traits§

  • The Receiver trait is used to allow the [RequestResponseProtocol] to receive messages from a network or other source.
  • The Sender trait is used to allow the [RequestResponseProtocol] to send messages to a specific recipient

Type Aliases§

  • A type alias for a shareable byte array