Expand description
Internal implementation detail of sonos-sdk. Not intended for direct use.
Sonos device discovery library
This crate provides a simple API for discovering Sonos devices on a local network using SSDP (Simple Service Discovery Protocol) and UPnP device descriptions.
§Quick Start
use sonos_discovery::get;
// Discover all Sonos devices on the network
let devices = get();
for device in devices {
println!("Found {} at {}", device.name, device.ip_address);
}§Iterator-based Discovery
For more control, use the iterator API:
use sonos_discovery::{get_iter, DeviceEvent};
for event in get_iter() {
match event {
DeviceEvent::Found(device) => {
println!("Found: {}", device.name);
// Can break early if needed
}
}
}Modules§
- device
- Device description parsing and validation.
Structs§
- Device
- Information about a discovered Sonos device.
- Discovery
Iterator - Iterator that discovers Sonos devices on the local network.
Enums§
- Device
Event - Events emitted during device discovery.
- Discovery
Error - Error type for discovery operations.
Functions§
- get
- Discover all Sonos devices on the local network with a default 3-second timeout.
- get_
iter - Get an iterator for discovering Sonos devices with a default 3-second timeout.
- get_
iter_ with_ timeout - Get an iterator for discovering Sonos devices with a custom timeout.
- get_
with_ timeout - Discover all Sonos devices on the local network with a custom timeout.
Type Aliases§
- Result
- Convenience Result type alias for discovery operations.