Skip to content

Instantly share code, notes, and snippets.

@willb
Created December 4, 2009 15:43
Show Gist options
  • Save willb/249084 to your computer and use it in GitHub Desktop.
Save willb/249084 to your computer and use it in GitHub Desktop.
require 'qmf'
require 'thread'
$queue = Queue.new
class MyHandler < Qmf::ConsoleHandler
def agent_added(agent)
$queue << agent
end
end
$connection = Qmf::Connection.new(Qmf::ConnectionSettings.new) unless $connection
$console = Qmf::Console.new(MyHandler.new) unless $console
$broker = $console.add_connection($connection) unless $broker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment