Function hydroflow::util::connect_tcp

source ·
pub fn connect_tcp<T: 'static, Codec: 'static + Clone + Decoder + Encoder<T>>(
    codec: Codec
) -> (TcpFramedSink<T>, TcpFramedStream<Codec>)
Expand description

This is 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.