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

转载于:https://www.cnblogs.com/livingintruth/archive/2012/03/31/2425805.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值