From df83f66e69ab9a32835bc1c15173d73e33a42f45 Mon Sep 17 00:00:00 2001
From: Peter Saint-Andre Added roundtrip for exchange of IBB <open/> element to provide proper layering between Jingle and IBB; defined how to close a single session within the bytestream; defined how to close the bytestream itself. The foregoing Jingle negotiation replaces the <open/> element from XEP-0047. Therefore the initiator can now immediately begin sending IBB packets using an IQ-set for each chunk as described in XEP-0047, where the responder will acknowledge each IQ-set in accordance with &rfc3920;. In essence, the foregoing Jingle negotiation replaces the <open/> element from XEP-0047. However, to provide consistent layering of Jingle on top of IBB (thus enabling separation of existing IBB code from new Jingle code), the initiator now MUST also send the <open/> element, with the same 'block-size' and 'sid' values as for the Jingle <transport/> element. This adds a roundtrip to the negotiation and could be considered a "no-op", but the extra roundtrip is inconsequential given that the parties are exchanging base64-encoded data in-band. The responder returns an IQ-result to the initiator. Now the initiator can begin sending IBB packets using an IQ-set for each chunk as described in XEP-0047, where the responder will acknowledge each IQ-set in accordance with &rfc3920;.
To close one session within a bytestream, the initiator sends an IBB <close/> element as specified in XEP-0047.
+To close the bytestream itself, the initiator terminates the Jingle session as specified in XEP-0166.
+The same processing rules and usage guidelines defined in XEP-0047 apply to the Jingle IBB Transport Method.
Thanks to Paul Aurich, Fabio Forno, and Marcus Lundblad for their feedback.
+