class Nonnative::HTTPServer

Attributes

queue[R]
server[R]

Public Class Methods

new(service) click to toggle source
Calls superclass method Nonnative::Server::new
# File lib/nonnative/http_server.rb, line 5
def initialize(service)
  log = File.open(service.log, 'a')
  events = Puma::Events.new(log, log)
  @server = Puma::Server.new(app, events)

  super service
end

Protected Instance Methods

perform_start() click to toggle source
# File lib/nonnative/http_server.rb, line 15
def perform_start
  server.add_tcp_listener '0.0.0.0', proxy.port
  server.run.join
end
perform_stop() click to toggle source
# File lib/nonnative/http_server.rb, line 20
def perform_stop
  server.stop(true)
end
wait_start() click to toggle source
Calls superclass method Nonnative::Runner#wait_start
# File lib/nonnative/http_server.rb, line 24
def wait_start
  timeout.perform do
    super until server.running
  end
end
wait_stop() click to toggle source
Calls superclass method Nonnative::Runner#wait_stop
# File lib/nonnative/http_server.rb, line 30
def wait_stop
  timeout.perform do
    super while server.running
  end
end