# File lib/jabber4r/protocol.rb, line 575 575: def send(wait=false, &block) 576: if wait 577: iq = nil 578: blockedThread = Thread.current 579: @session.connection.send(self.to_s, block) do |je| 580: if je.element_tag == "iq" and je.attr_id == @id 581: je.consume_element 582: iq = Iq.from_element(@session, je) 583: blockedThread.wakeup 584: end 585: end 586: Thread.stop 587: rturn iq 588: else 589: @session.connection.send(self.to_s, block) if @session 590: end 591: end