class GQTP::Backend::Coolio::Server
Attributes
host[RW]
port[RW]
Public Class Methods
new(options={})
click to toggle source
# File lib/gqtp/backend/coolio.rb, line 110 def initialize(options={}) @options = options @host = options[:host] || "0.0.0.0" @port = options[:port] || 10043 @loop = options[:loop] || ::Coolio::Loop.default end
Public Instance Methods
run() { |client| ... }
click to toggle source
# File lib/gqtp/backend/coolio.rb, line 117 def run @server = ::Coolio::TCPServer.new(@host, @port, Socket) do |client| yield(client) end @server.attach(@loop) @loop.run Request.new(@loop) end
shutdown()
click to toggle source
# File lib/gqtp/backend/coolio.rb, line 126 def shutdown @server.close end