[][src]Crate ssdp_client

An asynchronous library for discovering, notifying and subscribing to devices and services on a network.

SSDP stands for Simple Service Discovery Protocol and it is a protocol that distributes messages across a local network for devices and services to discover each other. SSDP can most commonly be found in devices that implement UPnP as it is used as the discovery mechanism for that standard.

Example

use futures::prelude::*;
use std::time::Duration;
use ssdp_client::SearchTarget;

let search_target = SearchTarget::RootDevice;
let responses = ssdp_client::search(&search_target, Duration::from_secs(3), 2).await?;
pin_utils::pin_mut!(responses);

while let Some(response) = responses.next().await {
    println!("{:?}", response?);
}

Structs

SearchResponse

Response given by ssdp control point

Enums

Error

The Error type

SearchTarget

Specify what SSDP control points to search for

URN

Uniform Resource Name

Functions

search

Search for SSDP control points within a network. Control Points will wait a random amount of time between 0 and mx seconds before responing to avoid flooding the requester with responses. Therefore, the timeout should be at least mx seconds.