def initialize(login = '', passcode = '', host = 'localhost', port = 61613, reliable = false, reconnect_delay = 5, connect_headers = {})
@protocol = Stomp::SPL_10
@hb_received = true
@hb_sent = true
@hbs = @hbr = false
@jruby = false
if defined?(RUBY_ENGINE) && RUBY_ENGINE =~ /jruby/
@jruby = true
end
if login.is_a?(Hash)
hashed_initialize(login)
else
@host = host
@port = port
@login = login
@passcode = passcode
@reliable = reliable
@reconnect_delay = reconnect_delay
@connect_headers = connect_headers
@ssl = false
@parameters = nil
@parse_timeout = 5
@connect_timeout = 0
@logger = Stomp::NullLogger.new
@autoflush = false
@closed_check = true
@hbser = false
@stompconn = false
@usecrlf = false
@max_hbread_fails = 0
@max_hbrlck_fails = 0
@fast_hbs_adjust = 0.0
@connread_timeout = 0
@tcp_nodelay = true
@start_timeout = 10
warn "login looks like a URL, do you have the correct parameters?" if @login =~ /:\/\//
end
@transmit_semaphore = Mutex.new
@read_semaphore = Mutex.new
@socket_semaphore = Mutex.new
@subscriptions = {}
@failure = nil
@connection_attempts = 0
socket
end