Trait snarkos_node_bft::Transport
source · pub trait Transport<N: Network>: Send + Sync {
// Required methods
fn send<'life0, 'async_trait>(
&'life0 self,
peer_ip: SocketAddr,
event: Event<N>
) -> Pin<Box<dyn Future<Output = Option<Receiver<Result<()>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn broadcast(&self, event: Event<N>);
}Expand description
Part of the Gateway API that deals with networking. This is a separate trait to allow for easier testing/mocking.