# File jabber4r/protocol.rb, line 761 def send(wait=false, &block) if wait message = nil blockedThread = Thread.current @session.connection.send(self.to_s, block) do |je| if je.element_tag == "message" and je.thread.element_data == @thread je.consume_element message = Message.from_element(@session, je) blockedThread.wakeup end end Thread.stop return message else @session.connection.send(self.to_s, block) if @session end end