Skip to main content

subscribe_with_timeout

Function subscribe_with_timeout 

Source
pub fn subscribe_with_timeout(
    client: &SonosClient,
    ip: &str,
    callback_url: &str,
    timeout_seconds: u32,
) -> Result<ManagedSubscription>
Expand description

Subscribe to RenderingControl events with custom timeout

Same as subscribe() but allows specifying a custom timeout.

§Arguments

  • client - The SonosClient to use for the subscription
  • ip - The IP address of the Sonos device
  • callback_url - URL where the device will send event notifications
  • timeout_seconds - How long the subscription should last

§Returns

A managed subscription for RenderingControl events