Function dfir_rs::util::bind_tcp

source ยท
pub async fn bind_tcp<Item, Codec>(
    endpoint: SocketAddr,
    codec: Codec,
) -> Result<(TcpFramedSink<Item>, TcpFramedStream<Codec>, SocketAddr), Error>
where Item: 'static, Codec: 'static + Clone + Decoder + Encoder<Item>, <Codec as Encoder<Item>>::Error: Debug,
Expand description

Create a listening tcp socket, and then as new connections come in, receive their data and forward it to a queue.