Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'qmf'
- # Connects to a broker on localhost with optional username and password
- # Example usage:
- # qmfc, broker = qmf_connect
- # qmfc.objects(:class=>"HelloObject")
- # ...
- def qmf_connect(username=nil, password=nil)
- qmfc = Qmf::Console.new
- cs = Qmf::ConnectionSettings.new
- cs.username = username if username
- cs.password = password if password
- broker = qmfc.add_connection(Qmf::Connection.new(cs))
- [qmfc,broker]
- end
Add Comment
Please, Sign In to add comment