`
cuijiemin
  • 浏览: 256370 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

xmpp协议分析

阅读更多
连接服务器:
SENT: <stream:stream to="jabber.cn" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0" >
RECV: <?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' id='43FEAEE5' xmlns='jabber:client' from='jabber.cn' version='1.0'>
RECV: <stream:features><register xmlns='http://jabber.org/features/iq-register'/><auth xmlns='http://jabber.org/features/iq-auth'/></stream:features>
登录(身份验证):
SENT: <iq id="jcl_103" type="get"><query xmlns="jabber:iq:auth"><username>renziyi</username></query></iq>
RECV: <iq id='jcl_103' type='result'><query xmlns='jabber:iq:auth'><username>renziyi</username><digest/><password/><resource/></query></iq>
SENT: <iq id="jcl_104" type="set"><query xmlns="jabber:iq:auth"><username>renziyi</username><resource>Exodus</resource><digest>2ee43612345655d3279a45227ede2969c7</digest></query></iq>
RECV: <iq id='jcl_104' type='result'/>
下载好友名单:
SENT: <iq id="jcl_105" type="get"><query xmlns="jabber:iq:roster"/></iq>
RECV: <iq id='jcl_105' type='result' from='renziyi@jabber.cn/Exodus'><query xmlns='jabber:iq:roster'><item jid='renzy@jabber.cn' name='renzy' subscription='to'><group>Friends</group></item></query></iq>
更改自己状态为上线:
SENT: <presence><c node="http://exodus.jabberstudio.org/caps" ver="0.9.1.0" xmlns="http://jabber.org/protocol/caps"/><status>Available</status><priority>1</priority></presence>


<!-- Search Google -->
Google 输入您的搜索字词 提交搜索表单
<!-- google_ad_client = "pub-7330597899926046"; google_ad_format = "350x30_sdo"; google_link_target = 2; google_color_bg = "ffffff"; google_color_link = "000000"; google_encoding = "GB2312"; //-->
<!-- Search Google --> <!-- google_ad_client = "pub-7330597899926046"; google_ad_slot = "8791774696"; google_ad_width = 468; google_ad_height = 60; //-->
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics