• API Documentation
Show / Hide Table of Contents
  • Rssdp
    • CustomHttpHeader
      • CustomHttpHeader
      • Name
      • ToString
      • Value
    • CustomHttpHeadersCollection
      • Add
      • Contains
      • Count
      • CustomHttpHeadersCollection
      • GetEnumerator
      • Item
      • Remove
    • DeviceAvailableEventArgs
      • DeviceAvailableEventArgs
      • DiscoveredDevice
      • IsNewlyDiscovered
    • DeviceEventArgs
      • Device
      • DeviceEventArgs
    • DeviceNetworkType
      • IPv4
      • IPv6
    • DeviceNetworkTypeExtensions
      • GetMulticastIPAddress
    • DeviceUnavailableEventArgs
      • DeviceUnavailableEventArgs
      • DiscoveredDevice
      • Expired
    • DiscoveredSsdpDevice
      • AsAt
      • CacheLifetime
      • DescriptionLocation
      • GetDeviceInfo
      • IsExpired
      • NotificationType
      • ResponseHeaders
      • ToString
      • Usn
    • ExceptionExtensions
      • IsCritical
    • ISsdpLogger
      • LogError
      • LogInfo
      • LogVerbose
      • LogWarning
    • NullLogger
      • Instance
      • LogError
      • LogInfo
      • LogVerbose
      • LogWarning
    • Resource
    • Resource.Attribute
    • Resource.String
      • ApplicationName
      • Hello
    • ServiceEventArgs
      • Service
      • ServiceEventArgs
    • SocketClosedException
      • SocketClosedException
    • SocketFactory
      • CreateUdpMulticastSocket
      • CreateUdpSocket
      • DeviceNetworkType
      • SocketFactory
    • SsdpDevice
      • AddDevice
      • AddService
      • CustomProperties
      • CustomResponseHeaders
      • DeviceAdded
      • DeviceRemoved
      • Devices
      • DeviceType
      • DeviceTypeNamespace
      • DeviceVersion
      • FriendlyName
      • FullDeviceType
      • Icons
      • Manufacturer
      • ManufacturerUrl
      • ModelDescription
      • ModelName
      • ModelNumber
      • ModelUrl
      • OnDeviceAdded
      • OnDeviceRemoved
      • OnServiceAdded
      • OnServiceRemoved
      • PresentationUrl
      • RemoveDevice
      • RemoveService
      • SerialNumber
      • ServiceAdded
      • ServiceRemoved
      • Services
      • SsdpDevice
      • StringToUri
      • Udn
      • Upc
      • Uuid
      • WriteDeviceDescriptionXml
    • SsdpDeviceExtensions
      • ToRootDevice
    • SsdpDeviceIcon
      • ColorDepth
      • Height
      • MimeType
      • Url
      • Width
    • SsdpDeviceLocator
      • SsdpDeviceLocator
    • SsdpDevicePropertiesCollection
      • Add
      • Contains
      • Count
      • GetEnumerator
      • Item
      • Remove
      • SsdpDevicePropertiesCollection
    • SsdpDeviceProperty
      • FullName
      • Name
      • Namespace
      • Value
    • SsdpDevicePublisher
      • SsdpDevicePublisher
    • SsdpEmbeddedDevice
      • RootDevice
      • SsdpEmbeddedDevice
    • SsdpRootDevice
      • CacheLifetime
      • Location
      • SsdpRootDevice
      • ToDescriptionDocument
      • UrlBase
    • SsdpService
      • ControlUrl
      • EventSubUrl
      • FullServiceType
      • ScpdUrl
      • ServiceId
      • ServiceType
      • ServiceTypeNamespace
      • ServiceVersion
      • SsdpService
      • Uuid
      • WriteServiceDescriptionXml
    • SsdpStandardsMode
      • Default
      • Relaxed
      • Strict
    • SsdpTraceLogger
      • LogError
      • LogInfo
      • LogVerbose
      • LogWarning
    • UdpSocket
      • Dispose
      • ReceiveAsync
      • SendTo
      • UdpSocket
  • Rssdp.Infrastructure
    • DisposableManagedObjectBase
      • Dispose
      • IsDisposed
      • ThrowIfDisposed
    • HttpParserBase<T>
      • IsContentHeader
      • Parse
      • ParseHttpVersion
      • ParseStatusLine
    • HttpRequestParser
      • IsContentHeader
      • Parse
      • ParseStatusLine
    • HttpResponseParser
      • IsContentHeader
      • Parse
      • ParseStatusLine
    • ISocketFactory
      • CreateUdpMulticastSocket
      • CreateUdpSocket
      • DeviceNetworkType
    • ISsdpCommunicationsServer
      • BeginListeningForBroadcasts
      • DeviceNetworkType
      • IsShared
      • RequestReceived
      • ResponseReceived
      • SendMessage
      • StopListeningForBroadcasts
      • StopListeningForResponses
      • UdpSendCount
      • UdpSendDelay
    • ISsdpDeviceLocator
      • DeviceAvailable
      • DeviceUnavailable
      • IsSearching
      • NotificationFilter
      • SearchAsync
      • StartListeningForNotifications
      • StopListeningForNotifications
    • ISsdpDevicePublisher
      • AddDevice
      • Devices
      • RemoveDevice
    • IUdpSocket
      • ReceiveAsync
      • SendTo
    • IUpnpDeviceValidator
      • GetValidationErrors
      • ThrowIfDeviceInvalid
    • ReceivedUdpData
      • Buffer
      • ReceivedBytes
      • ReceivedFrom
    • RequestReceivedEventArgs
      • Message
      • ReceivedFrom
      • RequestReceivedEventArgs
    • ResponseReceivedEventArgs
      • Message
      • ReceivedFrom
      • ResponseReceivedEventArgs
    • SsdpCommunicationsServer
      • BeginListeningForBroadcasts
      • DeviceNetworkType
      • Dispose
      • IsShared
      • RequestReceived
      • ResponseReceived
      • SendMessage
      • SsdpCommunicationsServer
      • StopListeningForBroadcasts
      • StopListeningForResponses
      • UdpSendCount
      • UdpSendDelay
    • SsdpConstants
      • DefaultUdpResendCount
      • DefaultUdpResendDelay
      • DefaultUdpSocketBufferSize
      • MaxUdpSocketBufferSize
      • MulticastLinkLocalAddressV6
      • MulticastLocalAdminAddress
      • MulticastPort
      • PnpDeviceTypeRootDevice
      • SsdpDefaultMulticastTimeToLive
      • UpnpDeviceTypeBasicDevice
      • UpnpDeviceTypeNamespace
      • UpnpDeviceTypeRootDevice
    • SsdpDeviceLocatorBase
      • DeviceAvailable
      • DeviceUnavailable
      • Dispose
      • IsSearching
      • NotificationFilter
      • OnDeviceAvailable
      • OnDeviceUnavailable
      • SearchAsync
      • SsdpDeviceLocatorBase
      • StartListeningForNotifications
      • StopListeningForNotifications
    • SsdpDevicePublisherBase
      • AddDevice
      • Devices
      • Dispose
      • Log
      • NotificationBroadcastInterval
      • RemoveDevice
      • SsdpDevicePublisherBase
      • StandardsMode
      • SupportPnpRootDevice
    • UdpEndPoint
      • IPAddress
      • Port
      • ToString
    • Upnp10DeviceValidator
      • GetValidationErrors
      • ThrowIfDeviceInvalid

Method SearchAsync

SearchAsync()

Performs a search for all devices using the default search timeout.

Declaration
public Task<IEnumerable<DiscoveredSsdpDevice>> SearchAsync()
Returns
Type Description
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
public Task<IEnumerable<DiscoveredSsdpDevice>> SearchAsync(string searchTarget)
Parameters
Type Name Description
System.String searchTarget

The criteria for the search. Value can be;

Root devicesupnp:rootdevice
Specific device by UUIDuuid:<device uuid>
Device typeFully qualified device type starting with urn: i.e urn:schemas-upnp-org:Basic:1

Returns
Type Description
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(TimeSpan)

Performs a search for all devices using the specified search timeout.

Declaration
public 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 seconds is recommended by the UPnP 1.1 specification, this method requires the value be greater 1 second if it is not zero. Specify TimeSpan.Zero to return only devices already in the cache.

Returns
Type Description
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
public Task<IEnumerable<DiscoveredSsdpDevice>> SearchAsync(string searchTarget, TimeSpan searchWaitTime)
Parameters
Type Name Description
System.String searchTarget

The criteria for the search. Value can be;

Root devicesupnp:rootdevice
Specific device by UUIDuuid:<device uuid>
Device typeA device namespace and type in format of urn:<device namespace>:device:<device type>:<device version> i.e urn:schemas-upnp-org:device:Basic:1
Service typeA service namespace and type in format of urn:<service namespace>:service:<servicetype>:<service version> i.e urn:my-namespace:service:MyCustomService:1

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 seconds is recommended by the UPnP 1.1 specification, this method requires the value be greater 1 second if it is not zero. Specify TimeSpan.Zero to return only devices already in the cache.

Returns
Type Description
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.

Back to top Copyright (c) 2017 Troy Willmot