Skip to main content

build_peer_stream_io

Function build_peer_stream_io 

Source
fn build_peer_stream_io<S, C>(
    peer: PeerId,
    stream: S,
    cache: Cache<PeerId, Sender<<C as Decoder>::Item>>,
    codec: C,
    ingress_from_peers: Sender<(PeerId, <C as Decoder>::Item)>,
    frame_writer_backpressure_bytes: usize,
) -> Sender<<C as Decoder>::Item>
where S: AsyncRead + AsyncWrite + Send + 'static, C: Encoder<<C as Decoder>::Item> + Decoder + Send + Sync + Clone + 'static, <C as Encoder<<C as Decoder>::Item>>::Error: Debug + Display + Send + Sync + 'static, <C as Decoder>::Error: Debug + Display + Send + Sync + 'static, <C as Decoder>::Item: AsRef<[u8]> + Clone + Send + 'static,