[−][src]Function ssdp_probe::ssdp_probe
pub fn ssdp_probe(
marker: &[u8],
max_results: usize,
max_duration: Duration,
bind_address: SocketAddr,
m_search: SsdpMSearch,
address: SocketAddr,
domain: Domain
) -> Result<Vec<IpAddr>, SsdpProbeError>
Perform an UPnP SSDP discovery, this is a "low level" method that is exposed if you wanna
tweak some parameters, most use cases should be ok with the
ssdp_probe_v4
and ssdp_probe_v6 functions.
Arguments
marker
: marker used to filter the results (if this is present in the received response, then the address will be returnedmax_results
: stop the discovery when the number of results is equal to thismax_duration
: stop the discovery after this durationbind_address
: address to bind to receive the responses, note that the port may automatically be changed is one one provided is already in use, you should probably stick to the default ip and port reserved for SSDPm_search
: query to perform, note that the port in the host will be automatically changed to the one used by thebind_address
(as is may be changed if the given one is not available)address
: address to send the search to, should be one one of the standard SSDP onesdomain
: whether to use IPv4 or IPv6, should be coherent with the addresses passed inaddress
andm_search.host
Returned Value
A list of all the addresses that responded to the discovery with a response containing the
sequence of bytes given in marker
. Note that there will be no duplicates in the list.