pub trait ApplicationNetworkSender<TMessage: Send>: Clone {
fn send_rpc<'life0, 'async_trait>(
&'life0 self,
recipient: PeerId,
req_msg: TMessage,
timeout: Duration
) -> Pin<Box<dyn Future<Output = Result<TMessage, RpcError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn send_to(
&self,
_recipient: PeerId,
_message: TMessage
) -> Result<(), NetworkError> { ... }
fn send_to_many(
&self,
_recipients: impl Iterator<Item = PeerId>,
_message: TMessage
) -> Result<(), NetworkError> { ... }
}Expand description
A simplified version of NetworkSender that doesn’t use ProtocolId in the input
It was already being implemented for every application, but is now standardized