[][src]Trait splinter::consensus::ConsensusNetworkSender

pub trait ConsensusNetworkSender: Send {
    fn send_to(
        &self,
        peer_id: &PeerId,
        message: Vec<u8>
    ) -> Result<(), ConsensusSendError>;
fn broadcast(&self, message: Vec<u8>) -> Result<(), ConsensusSendError>; }

Interface used by consensus to send messages to other nodes

Required methods

fn send_to(
    &self,
    peer_id: &PeerId,
    message: Vec<u8>
) -> Result<(), ConsensusSendError>

Send the message to the given peer.

fn broadcast(&self, message: Vec<u8>) -> Result<(), ConsensusSendError>

Send the message to all peers.

Loading content...

Implementors

Loading content...