Create a 1.1 commection
# File examples/stomp11_common.rb, line 30 def get_connection() conn_hdrs = {"accept-version" => "1.1", # 1.1 only "host" => virt_host, # the vhost } conn_hash = { :hosts => [ {:login => login, :passcode => passcode, :host => host, :port => port}, ], :connect_headers => conn_hdrs, } conn = Stomp::Connection.new(conn_hash) end
Server host
# File examples/stomp11_common.rb, line 18 def host() ENV['STOMP_HOST'] || "localhost" # The connect host name end
User id
# File examples/stomp11_common.rb, line 10 def login() ENV['STOMP_USER'] || 'guest' end
Number of messages
# File examples/stomp11_common.rb, line 43 def nmsgs() (ENV['STOMP_NMSGS'] || 1).to_i # Number of messages end
Password
# File examples/stomp11_common.rb, line 14 def passcode() ENV['STOMP_PASSCODE'] || 'guest' end
Generated with the Darkfish Rdoc Generator 2.