Class | Hookout::ThinBackend |
In: |
lib/hookout/thin_backend.rb
|
Parent: | Thin::Backends::Base |
Backend allowing Thin to act as a Reverse HTTP server
label | [RW] | Address and port on which the server is listening for connections. |
server_address | [RW] | Address and port on which the server is listening for connections. |
# File lib/hookout/thin_backend.rb, line 7 def initialize(server, label, options) @server_address = options[:address] @label = options[:label] super() end
Connect the server
# File lib/hookout/thin_backend.rb, line 15 def connect @connector = ReverseHttpConnector.new(@label, @server_address, self) @connector.report_poll_exceptions = true @connector.location_change_callback = lambda { |l| puts "Bound to location #{l}" } EventMachine.defer do @connector.start end end