[][src]Function sonor::discover

pub async fn discover(
    timeout: Duration
) -> Result<impl Stream<Item = Result<Speaker, Error>>, Error>

Discover sonos players on the network.

Example Usage

let mut devices = sonor::discover(Duration::from_secs(2)).await?;

while let Some(device) = devices.try_next().await? {
    let name = device.name().await?;
    println!("- {}", name);
}