pub fn run_packet_pipeline<WIn, WOut, C, D, T, TEvt, AppOut, AppIn>(
packet_key: OffchainKeypair,
wire_msg: (WOut, WIn),
codec: (C, D),
ticket_proc: T,
ticket_events: TEvt,
ack_config: AcknowledgementPipelineConfig,
api: (AppOut, AppIn),
) -> AbortableList<PacketPipelineProcesses>where
WOut: Sink<(PeerId, Box<[u8]>)> + Clone + Unpin + Send + 'static,
WOut::Error: Error,
WIn: Stream<Item = (PeerId, Box<[u8]>)> + Send + 'static,
C: PacketEncoder + Sync + Send + 'static,
D: PacketDecoder + Sync + Send + 'static,
T: UnacknowledgedTicketProcessor + Sync + Send + 'static,
TEvt: Sink<TicketEvent> + Clone + Unpin + Send + 'static,
TEvt::Error: Error,
AppOut: Sink<(HoprPseudonym, ApplicationDataIn)> + Send + 'static,
AppOut::Error: Error,
AppIn: Stream<Item = (ResolvedTransportRouting, ApplicationDataOut)> + Send + '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
overlay on top of the wire_msg Stream or Sink.