proxy_stream

Function proxy_stream 

Source
pub async fn proxy_stream<S, T>(
    s1: S,
    s2: T,
    token: CancellationToken,
) -> Result<(), Error>
where S: Sink<Message, Error = Error> + Stream<Item = Result<Message, Error>> + Unpin, T: Sink<Message, Error = Error> + Stream<Item = Result<Message, Error>> + Unpin,
Expand description

Proxies two streams.

  • s1 - The first stream.
  • s2 - The second stream.
  • token - The cancellation token to cancel the proxying.