Sha256: 4e41a16334b1e3de9b70a599237722a117aeff558ef887e9618cab8ed5273190

Contents?: true

Size: 795 Bytes

Versions: 31

Compression:

Stored size: 795 Bytes

Contents

# =XMPP4R - XMPP Library for Ruby
# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option.
# Website::http://home.gna.org/xmpp4r/

module Jabber
  module Bytestreams
    ##
    # Implementation of IBB at the initiator side
    class IBBInitiator < IBB
      # You may set the block-size before open
      attr_accessor :block_size

      ##
      # Open the stream to the peer,
      # waits for successful result
      #
      # May throw ServerError
      def open
        iq = Iq.new(:set, @peer_jid)
        open = iq.add REXML::Element.new('open')
        open.add_namespace IBB::NS_IBB
        open.attributes['sid'] = @session_id
        open.attributes['block-size'] = @block_size.to_s

        @stream.send_with_id(iq)

        activate
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 11 rubygems

Version Path
brontes3d-xmpp4r-0.4 lib/xmpp4r/bytestreams/helper/ibb/initiator.rb
edavey-xmpp4r-0.4.1 lib/xmpp4r/bytestreams/helper/ibb/initiator.rb
edavey-xmpp4r-0.4.2 lib/xmpp4r/bytestreams/helper/ibb/initiator.rb
edavey-xmpp4r-0.4 lib/xmpp4r/bytestreams/helper/ibb/initiator.rb
ln-xmpp4r-0.5 lib/xmpp4r/bytestreams/helper/ibb/initiator.rb
mojodna-xmpp4r-0.4.0.2 lib/xmpp4r/bytestreams/helper/ibb/initiator.rb
mojodna-xmpp4r-0.4.0.3 lib/xmpp4r/bytestreams/helper/ibb/initiator.rb
seanohalpin-xmpp4r-0.4.1 lib/xmpp4r/bytestreams/helper/ibb/initiator.rb
xmpp4r-0.5.5 lib/xmpp4r/bytestreams/helper/ibb/initiator.rb
gmcmillan-xmpp4r-0.6.2 lib/xmpp4r/bytestreams/helper/ibb/initiator.rb
gmcmillan-xmpp4r-0.6.1 lib/xmpp4r/bytestreams/helper/ibb/initiator.rb
gmcmillan-xmpp4r-0.6 lib/xmpp4r/bytestreams/helper/ibb/initiator.rb
gmcmillan-xmpp4r-0.5 lib/xmpp4r/bytestreams/helper/ibb/initiator.rb
mad-p-xmpp4r-0.6.3 lib/xmpp4r/bytestreams/helper/ibb/initiator.rb
mad-p-xmpp4r-0.6.2 lib/xmpp4r/bytestreams/helper/ibb/initiator.rb
mad-p-xmpp4r-0.6.1 lib/xmpp4r/bytestreams/helper/ibb/initiator.rb
mad-p-xmpp4r-0.6.0 lib/xmpp4r/bytestreams/helper/ibb/initiator.rb
cerberus-0.8.0 lib/vendor/xmpp4r/lib/xmpp4r/bytestreams/helper/ibb/initiator.rb
cerberus-0.7.9 lib/vendor/xmpp4r/lib/xmpp4r/bytestreams/helper/ibb/initiator.rb
edavis10-cerberus-0.7.8 lib/vendor/xmpp4r/lib/xmpp4r/bytestreams/helper/ibb/initiator.rb