Player APIs (BrightScript & Ja...
...
Object Reference
Networking Objects

roUPnPSearchEvent

2min
this event object is returned when there is a response to a roupnpcontroller search() operation it is also returned when the roupnpcontroller object receives multicast udp ssdp messages ifupnpsearchevent getobject() as object returns either an roupnpdevice or an roassociativearray instance, depending on the value returned from the gettype() method gettype() as integer returns an integer value indicating the type of response 0 (advertisement) – indicates the receipt of an ssdp multicast message, which can be either a notify message or an m search message the getobject() method will return an associative array with all ssdp headers and an "ssdptype" key, which can have a value of either "m search" or "notify" 1 (search response) – indicates that the message is a response to an roupnpcontrollor search() request the getobject() method will return an associative array with all headers from the http m search response 2 (new device added to the device list) – indicates that the roupnpcontroller object has detected a new device and added it to the device list, which is maintained internally device detection can result from receiving either an ssdp\ alive message or a response to an m search message the getobject() method will return an roupnpdevice instance containing information about the added device this message type is only delivered once per new device once a device is part of the device list, subsequent m search requests will only return type 1 (search response) values for that device 3 (device will be deleted from the device list) – indicates that a device will be deleted from the device list, which is maintained internally a device is deleted from the list when the player receives an ssdp\ byebye message from the device, when the device does not send an ssdp\ alive message within the defined "max age" interval, or when the device is forcibly removed using the roupnpcontroller removedevice() method the getobject() method will return an roupnpdevice instance containing information about the device to be removed ifuserdata setuserdata(user data as object) sets the user data that will be returned when events are raised getuserdata() as object returns the user data that has previously been set via setuserdata() it will return invalid if no data has been set