Skip to main content

proxy_remote

Function proxy_remote 

Source
pub async fn proxy_remote<T, F>(
    remote_sub: RemoteSubscription,
    sender: Sender<T>,
    shutdown: Receiver<bool>,
    convert: F,
)
where T: Send + 'static, F: Fn(Vec<Frame>) -> T,
Expand description

Proxy frames from a remote subscription to a local channel.

Receives frames from the remote subscription and converts them using the provided closure before sending through the local channel. Exits when:

  • The remote stream ends
  • The local channel closes (receiver dropped)
  • A shutdown signal is received