initial version

git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@202 4b5297f7-1745-476d-ba37-a9c6900126ab
xep-0352-v0.2
Peter Saint-Andre 2006-11-21 23:21:12 +00:00
parent 27c164fa26
commit 1597835c28
1 changed files with 129 additions and 0 deletions

129
xep-0199.xml 100644
View File

@ -0,0 +1,129 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>XMPP Ping</title>
<abstract>This document defines an XMPP protocol extension for sending pings over an XML stream.</abstract>
&LEGALNOTICE;
<number>0199</number>
<status>Experimental</status>
<type>Standards Track</type>
<jig>Standards JIG</jig>
<approver>Council</approver>
<dependencies>
<spec>XMPP Core</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>ping</shortname>
&stpeter;
<revision>
<version>0.1</version>
<date>2006-11-21</date>
<initials>psa</initials>
<remark><p>Initial version.</p></remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>As specified in &rfc3920;, the XML streams used in XMPP are bound to TCP. Unfortunately, TCP connections can go down without the application (XMPP) layer knowing about it. The traditional approach to solving this issue has been to periodically send so-called "whitespace pings" over the XML stream. This document recommends a more XML-friendly and XMPP-friendly approach, which can also be used with other bindings such as &xep0124;.</p>
</section1>
<section1 topic='Requirements' anchor='reqs'>
<p>This document addresses the following requirements:</p>
<ol start='1'>
<li>Determining the per-hop viability of an XML stream (i.e., its underlying binding) between a client and a server, or between two servers.</li>
<li>Determining end-to-end connectivity between any two XMPP entities.</li>
</ol>
</section1>
<section1 topic='Use Cases' anchor='usecases'>
<section2 topic='Stream-Level Pings' anchor='stream'>
<p>The typical usage for stream-level pings is for a server to test the viability of the underlying stream connection by pinging a connected client or server (however, a client may send pings as well). This is done by sending an &IQ; set over the stream, which SHOULD NOT include 'to' and 'from' addresses.</p>
<example caption="Ping"><![CDATA[
<iq type='set' id='ping123'>
<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>
<example caption="Pong"><![CDATA[
<iq type='result' id='ping123'/>
]]></example>
<p>If the other party to the stream does not support the ping namespace, it MUST return an IQ error, which SHOULD be &unavailable;:</p>
<example caption="Ping Not Supported"><![CDATA[
<iq type='error' id='ping123'>
<ping xmlns='urn:xmpp:ping'/>
<error type='cancel'>
<service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>
]]></example>
</section2>
<section2 topic='End-to-End Pings' anchor='e2e'>
<p>For end-to-end pings, the 'from' and 'to' addresses are necessary.</p>
<example caption="Ping"><![CDATA[
<iq from='romeo@montague.net/home'
to='juliet@capulet.com/chamber'
type='set'
id='ping234'>
<ping xmlns='urn:xmpp:ping'/>
</iq>
</iq>
]]></example>
<p>If the receiving entity supports the ping namespace, it SHOULD return an IQ result:</p>
<example caption="Pong"><![CDATA[
<iq from='romeo@montague.net/home'
to='juliet@capulet.com/chamber'
type='result'
id='ping234'/>
]]></example>
<p>If the receiving entity does not support the ping namespace, it SHOULD return an IQ error, which SHOULD be &unavailable;:</p>
<example caption="Ping Not Supported"><![CDATA[
<iq type='error' id='ping234'>
<ping xmlns='urn:xmpp:ping'/>
<error type='cancel'>
<service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>
]]></example>
<p>However, the receiving entity MAY ignore the IQ (e.g., if doing so would reveal presence information to an entity that is not authorized to view that information).</p>
</section2>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>This specification introduces no known security concerns above and beyond those specified in <cite>RFC 3920</cite>.</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>No interaction with &IANA; is necessary as a result of this document.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
<p>The &REGISTRAR; shall include 'urn:xmpp:ping' in its registry of protocol namespaces (see &NAMESPACES;).</p>
</section2>
</section1>
<section1 topic='XML Schema' anchor='schema'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='urn:xmpp:ping'
xmlns='urn:xmpp:ping'
elementFormDefault='qualified'>
<xs:element name='ping' type='empty'/>
<xs:simpleType name='empty'>
<xs:restriction base='xs:string'>
<xs:enumeration value=''/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
]]></code>
</section1>
</xep>