与XMPP相关试题一
如看文字比较累,课程中间有配套视频,文字部分和视频内容一致 3-简单阐述一下对XMPP协议理解以及优缺点?定义:
基本网络结构XMPP中定义了三个角色,客户端,服务器,网关。通信能够在这三者的任意两个之间双向发生。服务器同时承担了客户端信息记录,连接管理和信息的路由功能。网关承担着与异构即时通信系统的互联互通,异构系统可以包括SMS(短信),
客户端: <?xmlversion='1.0'?>
<stream:stream to='example_com' xmlns='jabber:client' xmlns:stream='http_etherx_jabber_org/streams' version='1.0'>
服务器: <?xmlversion='1.0'?>
<stream:stream from='example_com' id='someid' xmlns='jabber:client' xmlns:stream='http_etherx_jabber_org/streams' version='1.0'>
其他通信 <messagefrom='juliet_example_com'
to='romeo_example_net'
xml:lang='zh-cn'>
<body>Art thou not Romeo,and a Montague?</body>
</message>
服务器: <message from='romeo_example_net' to='juliet_example_com' xml:lang='zh-cn'>
<body>Neither,fair saint,if either thee dislike.</body>
</message>
客户端: </stream:stream>
服务器: </stream:stream>
<presence from="abc@jabber.org/contact" to="def@jabber.org/contact">
<status>online</status>
</presence>
<message from="abc@jabber.org/contact" to="def@jabber.org/contact" type=“chat”>
<body>hello</body>
</message>
<iq from="abc@jabber.org/contact" id=“id11” type=“result”>
</iq>
及时聊天的展示形式
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |