[−][src]Module mdns::resolve
Utilities for resolving a devices on the LAN.
Examples
use mdns::Error; use std::time::Duration; const SERVICE_NAME: &'static str = "_googlecast._tcp.local"; const HOST: &'static str = "mycast._googlecast._tcp.local"; #[async_std::main] async fn main() -> Result<(), Error> { if let Some(response) = mdns::resolve::one(SERVICE_NAME, HOST, Duration::from_secs(15)).await? { println!("{:?}", response); } Ok(()) }
Functions
multiple | Resolve multiple devices by hostname |
one | Resolve a single device by hostname |