hopr_transport_protocol

Function run_msg_ack_protocol

Source
pub async fn run_msg_ack_protocol<Db>(
    packet_cfg: PacketInteractionConfig,
    db: Db,
    bloom_filter_persistent_path: Option<String>,
    wire_ack: (impl Sink<(PeerId, Acknowledgement)> + Send + Sync + 'static, impl Stream<Item = (PeerId, Acknowledgement)> + Send + Sync + 'static),
    wire_msg: (impl Sink<(PeerId, Box<[u8]>)> + Clone + Unpin + Send + Sync + 'static, impl Stream<Item = (PeerId, Box<[u8]>)> + Send + Sync + 'static),
    api: (impl Sink<ApplicationData> + Send + Sync + 'static, impl Stream<Item = (ApplicationData, TransportPath, PacketSendFinalizer)> + Send + Sync + 'static),
) -> HashMap<ProtocolProcesses, JoinHandle<()>>
where Db: HoprDbProtocolOperations + Debug + Clone + Send + Sync + 'static,
Expand description

Run all processes responsible for handling the msg and acknowledgment protocols.

The pipeline does not handle the mixing itself, that needs to be injected as a separate process overlayed on top of the wire_msg Stream or Sink.