1.0 Draft

git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@934 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2007-06-12 16:19:56 +00:00
parent f2eae2bd9d
commit 1524761fd1
1 changed files with 24 additions and 18 deletions

View File

@ -10,7 +10,7 @@
<abstract>This document defines an XMPP protocol extension for sending pings over XML streams.</abstract>
&LEGALNOTICE;
<number>0199</number>
<status>Proposed</status>
<status>Draft</status>
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
@ -19,8 +19,14 @@
</dependencies>
<supersedes/>
<supersededby/>
<shortname>TO BE ASSIGNED</shortname>
<shortname>ping</shortname>
&stpeter;
<revision>
<version>1.0</version>
<date>2007-06-12</date>
<initials>psa</initials>
<remark><p>Per a vote of the XMPP Council, advanced status to Draft; XMPP Registrar issued urn:xmpp:ping namespace.</p></remark>
</revision>
<revision>
<version>0.5</version>
<date>2007-05-30</date>
@ -66,7 +72,7 @@
<section1 topic='Protocol' anchor='protocol'>
<p>The XMPP ping protocol is extremely simple:</p>
<ol>
<li>The pinging entity sends an IQ-get containing a &lt;ping/&gt; element qualified by the 'http://www.xmpp.org/extensions/xep-0199.html#ns' namespace &NSNOTE;.</li>
<li>The pinging entity sends an IQ-get containing a &lt;ping/&gt; element qualified by the 'urn:xmpp:ping' namespace.</li>
<li>The pinged entity returns either an IQ-result (if it supports the namespace) or an IQ-error (if it does not).</li>
</ol>
</section1>
@ -75,7 +81,7 @@
<p>One popular usage is for a server to test the viability of the underlying stream connection by pinging a connected client. This is done by sending an &IQ; get over the stream from the server to the client.</p>
<example caption="Ping"><![CDATA[
<iq from='capulet.lit' to='juliet@capulet.lit/balcony' id='s2c1' type='get'>
<ping xmlns='http://www.xmpp.org/extensions/xep-0199.html#ns'/>
<ping xmlns='urn:xmpp:ping'/>
</iq>
]]></example>
<p>If the client supports the ping namespace, it MUST return an IQ-result, which functions as a "pong":</p>
@ -85,7 +91,7 @@
<p>If the client does not support the ping namespace, it MUST return a &unavailable; error:</p>
<example caption="Ping Not Supported"><![CDATA[
<iq from='juliet@capulet.lit/balcony' to='capulet.lit' id='s2c1' type='error'>
<ping xmlns='http://www.xmpp.org/extensions/xep-0199.html#ns'/>
<ping xmlns='urn:xmpp:ping'/>
<error type='cancel'>
<service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
@ -97,7 +103,7 @@
<p>A client may also ping its server by sending an IQ-get over the stream between the two entities.</p>
<example caption="Ping"><![CDATA[
<iq from='juliet@capulet.lit/balcony' to='capulet.lit' id='c2s1' type='get'>
<ping xmlns='http://www.xmpp.org/extensions/xep-0199.html#ns'/>
<ping xmlns='urn:xmpp:ping'/>
</iq>
]]></example>
<p>Note: The client MAY include a 'to' address of the client's bare JID (&BAREJID;, in this instance "juliet@capulet.lit" or MAY include no 'to' address (this signifies that the stanza shall be handled by the server on behalf of the connected user's bare JID, which in the case of &IQ; stanzas is equivalent to directing the IQ-get to the server itself).</p>
@ -108,7 +114,7 @@
<p>If the server does not support the ping namespace, it MUST return a &unavailable; error:</p>
<example caption="Ping Not Supported"><![CDATA[
<iq from='capulet.lit' to='juliet@capulet.lit/balcony' id='c2s1' type='error'>
<ping xmlns='http://www.xmpp.org/extensions/xep-0199.html#ns'/>
<ping xmlns='urn:xmpp:ping'/>
<error type='cancel'>
<service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
@ -120,7 +126,7 @@
<p>Pings can also be used to test a server-to-server connection. This is done by sending an IQ-get over the stream from one server to another.</p>
<example caption="Ping"><![CDATA[
<iq from='capulet.lit' to='montague.lit' id='s2s1' type='get'>
<ping xmlns='http://www.xmpp.org/extensions/xep-0199.html#ns'/>
<ping xmlns='urn:xmpp:ping'/>
</iq>
]]></example>
<p>If the other party to the stream supports the ping namespace, it MUST return an IQ-result:</p>
@ -130,7 +136,7 @@
<p>If the other party to the stream does not support the ping namespace, it MUST return a &unavailable; error:</p>
<example caption="Ping Not Supported"><![CDATA[
<iq from='montague.lit' to='capulet.lit' id='s2s1' type='error'>
<ping xmlns='http://www.xmpp.org/extensions/xep-0199.html#ns'/>
<ping xmlns='urn:xmpp:ping'/>
<error type='cancel'>
<service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
@ -145,7 +151,7 @@
to='juliet@capulet.lit/chamber'
type='get'
id='e2e1'>
<ping xmlns='http://www.xmpp.org/extensions/xep-0199.html#ns'/>
<ping xmlns='urn:xmpp:ping'/>
</iq>
]]></example>
<p>Note: The 'to' address should be a full JID (&FULLJID;), since a ping sent to a bare JID (&BAREJID;) will be handled by the server on behalf of the client.</p>
@ -162,7 +168,7 @@
to='romeo@montague.lit/home'
id='e2e1'
type='result'>
<ping xmlns='http://www.xmpp.org/extensions/xep-0199.html#ns'/>
<ping xmlns='urn:xmpp:ping'/>
<error type='cancel'>
<service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
@ -177,7 +183,7 @@
to='juliet@capulet.lit/chamber'
type='get'
id='comp1'>
<ping xmlns='http://www.xmpp.org/extensions/xep-0199.html#ns'/>
<ping xmlns='urn:xmpp:ping'/>
</iq>
]]></example>
<p>Note: The 'to' address should be a full JID (&FULLJID;), since a ping sent to a bare JID (&BAREJID;) will be handled by the server on behalf of the client.</p>
@ -194,7 +200,7 @@
to='chat.shakespeare.lit'
id='comp1'
type='error'>
<ping xmlns='http://www.xmpp.org/extensions/xep-0199.html#ns'/>
<ping xmlns='urn:xmpp:ping'/>
<error type='cancel'>
<service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
@ -205,7 +211,7 @@
</section1>
<section1 topic='Discovering Support' anchor='disco'>
<p>If an entity supports the XMPP Ping protocol, it MUST report that by including a service discovery feature of "http://www.xmpp.org/extensions/xep-0199.html#ns" &NSNOTE; in response to a &xep0030; information request:</p>
<p>If an entity supports the XMPP Ping protocol, it MUST report that by including a service discovery feature of "urn:xmpp:ping" in response to a &xep0030; information request:</p>
<example caption="Service Discovery information request"><![CDATA[
<iq type='get'
from='juliet@capulet.lit/balcony'
@ -221,7 +227,7 @@
id='disco1'>
<query xmlns='http://jabber.org/protocol/disco#info'>
...
<feature var='http://www.xmpp.org/extensions/xep-0199.html#ns'/>
<feature var='urn:xmpp:ping'/>
...
</query>
</iq>
@ -237,7 +243,7 @@
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
<p>Until this specification advances to a status of Draft, its associated namespace shall be "http://www.xmpp.org/extensions/xep-0199.html#ns"; upon advancement of this specification, the &REGISTRAR; shall issue a permanent namespace in accordance with the process defined in Section 4 of &xep0053;.</p>
<p>The &REGISTRAR; includes "urn:xmpp:ping" in its registry of protocol namespaces (see &NAMESPACES;).</p>
</section2>
</section1>
@ -247,8 +253,8 @@
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='http://www.xmpp.org/extensions/xep-0199.html#ns'
xmlns='http://www.xmpp.org/extensions/xep-0199.html#ns'
targetNamespace='urn:xmpp:ping'
xmlns='urn:xmpp:ping'
elementFormDefault='qualified'>
<xs:element name='ping' type='empty'/>