[][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 returned
  • max_results: stop the discovery when the number of results is equal to this
  • max_duration: stop the discovery after this duration
  • bind_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 SSDP
  • m_search: query to perform, note that the port in the host will be automatically changed to the one used by the bind_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 ones
  • domain: whether to use IPv4 or IPv6, should be coherent with the addresses passed in address and m_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.

See

SsdpMSearch