# File jabber4r/protocol.rb, line 572 def send(wait=false, &block) if wait iq = nil blockedThread = Thread.current @session.connection.send(self.to_s, block) do |je| if je.element_tag == "iq" and je.attr_id == @id je.consume_element iq = Iq.from_element(@session, je) blockedThread.wakeup end end Thread.stop rturn iq else @session.connection.send(self.to_s, block) if @session end end