Class: EasyUpnp::HttpListener::Options

Inherits:
OptionsBase show all
Defined in:
lib/easy_upnp/events/http_listener.rb

Constant Summary collapse

DEFAULTS =
{
  # Port to listen on. Default value "0" will cause OS to choose a random
  # ephemeral port
  listen_port: 0,

  # Address to bind listener on. Default value binds to all IPv4
  # interfaces.
  bind_address: '0.0.0.0',

  # By default, event callback just prints the changed state vars
  callback: ->(state_vars) {
    puts state_vars.inspect
  },

  # Parses event bodies.  By default parse the XML into a hash.  Use
  # EasyUpnp::NoOpEventParser to skip parsing
  event_parser: EasyUpnp::DefaultEventParser
}

Instance Attribute Summary

Attributes inherited from OptionsBase

#options

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Options

Returns a new instance of Options.



28
29
30
# File 'lib/easy_upnp/events/http_listener.rb', line 28

def initialize(options)
  super(options, DEFAULTS)
end