zoukankan      html  css  js  c++  java
  • xmpp协议阅读总结

    xmpp的官网,上面有xmpp的一切重要信息: http://xmpp.org

    XMPP(Extensible Messaging and Presence Protocol),  是XML的一种应用, 用于即时的(near real time)在两个或多个网络实体(network entity)间交换 结构化的可扩展的数据(structured and extensible data), 

    以下两个是XMPP的两个主要的协议, 第一个主要讲了如何建立和关闭一个XML stream , XML stream, XML stanza的定义, XMPP中的术语(terminology)的定义, XMPP的技术结构(2章architecture), 以及一些概念的简单性介绍, 如XML namespace ,详细的有相应的文档,    其中有7节有个 resource binding , 这个是bare JID的最后一部份, 相当于我们工程中的sessionId, 一个user account可以有多个session,   第8节介绍了 XML stanza, 如所有stanza的 common attribute, to, from, type, id, xml:lang,   特别写了stanza的错误处理, 错误类型 , 然后举了一些例子

    http://xmpp.org/rfcs/rfc6120.html

    http://xmpp.org/rfcs/rfc6121.html

    这个文档XMPP 扩展了 XMPP core feature, 提供了基本的 Instant Messaging and Presence    功能,    

    managing the roster, 服务端要管理user的 好友列表, 2节讲了相关的协议

    managing presence subscribtions , 管理一个user presence对哪些user可见, B想看到A的presence , 需要去subscribe, A要同意才行, 双方任一解除, 就不再可见

    以上两个目前talk工程都没有实现

    4 , exchanging presence information,  介绍了presence的基本概念, 广播, 语法....(后面细看)

    5, exchanging messages,   a message stanza is used to "push" information to another entity,  讲了message stanza的语法,  to , type  attribute, body element , 以及 extended content,如何扩展, 没明白, 不详细

    然后讲了一个sample session, 和server rules, 如何处理XML stanza

    XMPP is designed for the exchange of XML stanzas (not arbitrary XML data),  xml  stanza的定义在 1)的4.1,  A stanza is a first-level element (at depth=1 of the stream) whose element name is "message", "presence", or "iq" and whose qualifying namespace is 'jabber:client' or 'jabber:server'

    xml namespace的一篇文章, 讲得挺明白 http://www.w3school.com.cn/xml/xml_namespaces.asp

  • 相关阅读:
    cJSON库源码分析
    cJSON 使用详解
    day23
    day22
    作业21
    day21
    作业20
    day20
    作业
    day19
  • 原文地址:https://www.cnblogs.com/livingintruth/p/2425805.html
Copyright © 2011-2022 走看看