class GQTP::Backend::Eventmachine::Server

Attributes

host[RW]
port[RW]

Public Class Methods

new(options={}) click to toggle source
# File lib/gqtp/backend/eventmachine.rb, line 115
def initialize(options={})
  @options = options
  @host = options[:host] || "0.0.0.0"
  @port = options[:port] || 10043
end

Public Instance Methods

run(&block) click to toggle source
# File lib/gqtp/backend/eventmachine.rb, line 121
def run(&block)
  @signature =
    EventMachine.start_server(@host, @port, ServerHandler, block)
  Request.new
end
shutdown() click to toggle source
# File lib/gqtp/backend/eventmachine.rb, line 127
def shutdown
  EventMachine.stop_server(@signature)
end