Class Jabber::Bytestreams::IBBInitiator
In: lib/xmpp4r/bytestreams/helper/ibb/initiator.rb
Parent: IBB

Implementation of IBB at the initiator side

Methods

open  

Attributes

block_size  [RW]  You may set the block-size before open

Public Instance methods

Open the stream to the peer, waits for successful result

May throw ErrorException

[Source]

    # File lib/xmpp4r/bytestreams/helper/ibb/initiator.rb, line 14
14:       def open
15:         iq = Iq.new(:set, @peer_jid)
16:         open = iq.add REXML::Element.new('open')
17:         open.add_namespace IBB::NS_IBB
18:         open.attributes['sid'] = @session_id
19:         open.attributes['block-size'] = @block_size
20: 
21:         @stream.send_with_id(iq) { |answer|
22:           answer.type == :result
23:         }
24: 
25:         activate
26:       end

[Validate]