Class: RUPNP::SSDP::USearchResponder

Inherits:
EM::Connection
  • Object
show all
Includes:
HTTP, SearchResponder
Defined in:
lib/rupnp/ssdp/usearch_responder.rb

Overview

M-SEARCH responder for M-SEARCH unicast requests from control points.

Author:

  • Sylvain Daubert

Instance Method Summary collapse

Methods included from SearchResponder

#receive_data, #send_response

Methods included from HTTP

#get_http_headers, #get_http_verb, #is_http_status_ok?

Constructor Details

#initialize(device, options = {}) ⇒ USearchResponder

Returns a new instance of USearchResponder.

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :ttl (Integer)


13
14
15
16
17
# File 'lib/rupnp/ssdp/usearch_responder.rb', line 13

def initialize(device, options={})
  @device = device
  @options = options
  set_ttl options[:ttl] || DEFAULT_TTL
end