Method: UPnP::Device#advertise
- Defined in:
- lib/UPnP/device.rb
#advertise ⇒ Object
Advertises this device, its sub-devices and services. Always advertises from the root device.
435 436 437 438 439 440 441 442 443 444 445 |
# File 'lib/UPnP/device.rb', line 435 def advertise addrinfo = Socket.getaddrinfo Socket.gethostname, 0, Socket::AF_INET, Socket::SOCK_STREAM @hosts = addrinfo.map { |type, port, host, ip,| ip }.uniq @advertise_thread = Thread.start do Thread.abort_on_exception = true ssdp.advertise root_device, @server[:Port], @hosts end end |