Function hydroflow::util::connect_tcp

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

The inverse of bind_tcp.

When messages enqueued into the returned sender, tcp sockets will be created and connected as necessary to send out the requests. As the responses come back, they will be forwarded to the returned receiver.