# File lib/jabber4r/protocol.rb, line 157
157:       def send(xml, proc=nil, &block)
158:         Jabber::DEBUG && puts("SENDING:\n#{ xml.kind_of?(String) ? xml : xml.to_s }")
159:         xml = xml.to_s if not xml.kind_of? String
160:         block = proc if proc
161:         @threadBlocks[Thread.current]=block if block
162:         begin
163:           @socket << xml
164:         rescue
165:           raise JabberConnectionException.new(true, xml)
166:         end
167:         @pollCounter = 10
168:       end