draft-ietf-xmpp-websocket-04.txt   draft-ietf-xmpp-websocket-05.txt 
XMPP Working Group L. Stout, Ed. XMPP Working Group L. Stout, Ed.
Internet-Draft &yet Internet-Draft &yet
Intended status: Standards Track J. Moffitt Intended status: Standards Track J. Moffitt
Expires: October 22, 2014 Mozilla Expires: October 22, 2014 Mozilla
E. Cestari E. Cestari
cstar industries cstar industries
April 20, 2014 April 20, 2014
An XMPP Sub-protocol for WebSocket An XMPP Sub-protocol for WebSocket
draft-ietf-xmpp-websocket-04 draft-ietf-xmpp-websocket-05
Abstract Abstract
This document defines a binding for the XMPP protocol over a This document defines a binding for the XMPP protocol over a
WebSocket transport layer. A WebSocket binding for XMPP provides WebSocket transport layer. A WebSocket binding for XMPP provides
higher performance than the current HTTP binding for XMPP. higher performance than the current HTTP binding for XMPP.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
skipping to change at page 2, line 19 skipping to change at page 2, line 19
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. XMPP Sub-Protocol . . . . . . . . . . . . . . . . . . . . . . 3 3. XMPP Sub-Protocol . . . . . . . . . . . . . . . . . . . . . . 3
3.1. Handshake . . . . . . . . . . . . . . . . . . . . . . . . 3 3.1. Handshake . . . . . . . . . . . . . . . . . . . . . . . . 3
3.2. WebSocket Messages . . . . . . . . . . . . . . . . . . . 4 3.2. WebSocket Messages . . . . . . . . . . . . . . . . . . . 4
3.3. XMPP Framing . . . . . . . . . . . . . . . . . . . . . . 4 3.3. XMPP Framing . . . . . . . . . . . . . . . . . . . . . . 4
3.3.1. Framed XML Stream . . . . . . . . . . . . . . . . . . 4 3.3.1. Framed XML Stream . . . . . . . . . . . . . . . . . . 4
3.3.2. Framed Stream Namespace . . . . . . . . . . . . . . . 5 3.3.2. Framed Stream Namespace . . . . . . . . . . . . . . . 5
3.3.3. Stream Frames . . . . . . . . . . . . . . . . . . . . 5 3.3.3. Stream Frames . . . . . . . . . . . . . . . . . . . . 5
3.4. Stream Initiation . . . . . . . . . . . . . . . . . . . . 6 3.4. Stream Initiation . . . . . . . . . . . . . . . . . . . . 6
3.5. Stream Errors . . . . . . . . . . . . . . . . . . . . . . 7 3.5. Stream Errors . . . . . . . . . . . . . . . . . . . . . . 6
3.6. Closing the Connection . . . . . . . . . . . . . . . . . 7 3.6. Closing the Connection . . . . . . . . . . . . . . . . . 7
3.6.1. see-other-uri . . . . . . . . . . . . . . . . . . . . 8 3.6.1. see-other-uri . . . . . . . . . . . . . . . . . . . . 8
3.7. Stream Restarts . . . . . . . . . . . . . . . . . . . . . 8 3.7. Stream Restarts . . . . . . . . . . . . . . . . . . . . . 8
3.8. Pings and Keepalives . . . . . . . . . . . . . . . . . . 8 3.8. Pings and Keepalives . . . . . . . . . . . . . . . . . . 8
3.9. Use of TLS . . . . . . . . . . . . . . . . . . . . . . . 9 3.9. Use of TLS . . . . . . . . . . . . . . . . . . . . . . . 9
3.10. Stream Management . . . . . . . . . . . . . . . . . . . . 9 3.10. Stream Management . . . . . . . . . . . . . . . . . . . . 9
4. Discovering the WebSocket Connection Method . . . . . . . . . 9 4. Discovering the WebSocket Connection Method . . . . . . . . . 9
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10
5.1. WebSocket Subprotocol Name . . . . . . . . . . . . . . . 10 5.1. WebSocket Subprotocol Name . . . . . . . . . . . . . . . 10
5.2. URN Sub-Namespace . . . . . . . . . . . . . . . . . . . . 10 5.2. URN Sub-Namespace . . . . . . . . . . . . . . . . . . . . 10
skipping to change at page 6, line 5 skipping to change at page 5, line 44
is NOT RECOMMENDED as WebSocket messages are already mandated to be is NOT RECOMMENDED as WebSocket messages are already mandated to be
UTF-8 encoded and therefore would only add a constant size overhead UTF-8 encoded and therefore would only add a constant size overhead
to each message. to each message.
The first character of each frame MUST be a '<' character. The first character of each frame MUST be a '<' character.
Every XMPP stanza or other XML element (including the stream open and Every XMPP stanza or other XML element (including the stream open and
close headers) sent directly over the XML stream MUST be sent in its close headers) sent directly over the XML stream MUST be sent in its
own frame. own frame.
Examples of WebSocket messages that contain independently parsable Example of a WebSocket message that contains an independently
XML documents (note that for stream features and errors, there is no parsable XML document:
parent context element providing the "stream" namespace prefix as in
[RFC6120], and thus the stream namespace MUST be declared): <message xmlns="jabber:client" xml:lang="en">
<body>Every WebSocket message is parsable by itself.</body>
</message>
Note that for stream features and errors, there is no parent context
element providing the "stream" namespace prefix as in [RFC6120], and
thus the stream prefix MUST be declared or use an unprefixed form:
-- WS Message boundary --
<stream:features xmlns:stream="http://etherx.jabber.org/streams"> <stream:features xmlns:stream="http://etherx.jabber.org/streams">
<bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/> <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/>
</stream:features> </stream:features>
-- WS Message boundary --
-- OR --
<error xmlns="http://etherx.jabber.org/streams"> <error xmlns="http://etherx.jabber.org/streams">
<host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/> <host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/>
</error> </error>
-- WS Message boundary --
<message xmlns="jabber:client" xml:lang="en">
<body>Every WebSocket message is parsable by itself.</body>
</message>
3.4. Stream Initiation 3.4. Stream Initiation
The first message sent after the WebSocket opening handshake MUST be The first message sent after the WebSocket opening handshake MUST be
from the initiating entity, and MUST be an <open/> element qualified from the initiating entity, and MUST be an <open/> element qualified
by the "urn:ietf:params:xml:ns:xmpp-framing" namespace and with the by the "urn:ietf:params:xml:ns:xmpp-framing" namespace and with the
same attributes mandated for the <stream> opening tag as described in same attributes mandated for the <stream> opening tag as described in
Section 4.7 of [RFC6120]. Section 4.7 of [RFC6120].
The receiving entity MUST respond with either an <open /> element The receiving entity MUST respond with either an <open /> element
 End of changes. 6 change blocks. 
12 lines changed or deleted 14 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/