Method SearchAsync
SearchAsync()
Aynchronously performs a search for all devices using the default search timeout, and returns an awaitable task that can be used to retrieve the results.
Declaration
Task<IEnumerable<DiscoveredSsdpDevice>> SearchAsync()
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<DiscoveredSsdpDevice>> | A task whose result is an System.Collections.Generic.IEnumerable<T> of DiscoveredSsdpDevice instances, representing all found devices. |
SearchAsync(String)
Performs a search for the specified search target (criteria) and default search timeout.
Declaration
Task<IEnumerable<DiscoveredSsdpDevice>> SearchAsync(string searchTarget)
Parameters
| Type | Name | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| System.String | searchTarget | The criteria for the search. Value can be;
|
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<DiscoveredSsdpDevice>> | A task whose result is an System.Collections.Generic.IEnumerable<T> of DiscoveredSsdpDevice instances, representing all found devices. |
SearchAsync(String, TimeSpan)
Performs a search for the specified search target (criteria) and search timeout.
Declaration
Task<IEnumerable<DiscoveredSsdpDevice>> SearchAsync(string searchTarget, TimeSpan searchWaitTime)
Parameters
| Type | Name | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| System.String | searchTarget | The criteria for the search. Value can be;
|
||||||||
| System.TimeSpan | searchWaitTime | The amount of time to wait for network responses to the search request. Longer values will likely return more devices, but increase search time. A value between 1 and 5 is recommended by the UPnP 1.1 specification. Specify TimeSpan.Zero to return only devices already in the cache. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<DiscoveredSsdpDevice>> | A task whose result is an System.Collections.Generic.IEnumerable<T> of DiscoveredSsdpDevice instances, representing all found devices. |
Remarks
By design RSSDP does not support 'publishing services' as it is intended for use with non-standard UPnP devices that don't publish UPnP style services. However, it is still possible to use RSSDP to search for devices implemetning these services if you know the service type.
SearchAsync(TimeSpan)
Performs a search for all devices using the specified search timeout.
Declaration
Task<IEnumerable<DiscoveredSsdpDevice>> SearchAsync(TimeSpan searchWaitTime)
Parameters
| Type | Name | Description |
|---|---|---|
| System.TimeSpan | searchWaitTime | The amount of time to wait for network responses to the search request. Longer values will likely return more devices, but increase search time. A value between 1 and 5 is recommended by the UPnP 1.1 specification. Specify TimeSpan.Zero to return only devices already in the cache. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<DiscoveredSsdpDevice>> | A task whose result is an System.Collections.Generic.IEnumerable<T> of DiscoveredSsdpDevice instances, representing all found devices. |