• 大小: 3.38M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签: C#    

资源简介

1客户端异步向服务器端发送连接请求

<stream:stream to='localhost' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>

2服务器端收到请求,初始化回应流,并随机生成一相SessionID

 <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="localhost" id="30e3b8c0" >

3等待服务器返回消息后客户端发送用户名(由于在客户端采用了异步调用
方式,所以UI界面感觉不到等待)

<iq xmlns="jabber:client" id="agsXMPP_1" type="get" to="localhost">
<query xmlns="jabber:iq:auth"><username>test</username></query></iq>

4服务器端收到用户名等待用户提供密码

<iq xmlns="jabber:client" from="localhost" type="result" id="agsXMPP_1">
<query xmlns="jabber:iq:auth"><username>test</username><password />
<digest /></query></iq>

5客户端提供加密后的密码

<iq xmlns="jabber:client" id="agsXMPP_2" to="localhost" type="set">
<query xmlns="jabber:iq:auth"><username>test</username>
<digest>e66557d2b67256bf7e9b317a51b6101674a56b5e</digest>
<resource>MiniClient</resource></query></iq>

6服务器端从数据库验证用户名和密码,并返回结果

iq xmlns="jabber:client" from="localhost" type="result" id="agsXMPP_2" />

7如果返回错误,客户端提示并终断连接,否则客户端发送响应数据

服务器端返回数据

客户端发送状态,

10服务器收到状态,发送IQ节并通知其它用户.

资源截图

代码片段和文件信息

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Copyright (c) 2003-2008 by AG-Software   *
 * All Rights Reserved.  *
 * Contact information for AG-Software is available at http://www.ag-software.de  *
 *  *
 * Licence:  *
 * The agsXMPP SDK is released under a dual licence  *
 * agsXMPP can be used under either of two licences  *
 *   *
 * A commercial licence which is probably the most appropriate for commercial   *
 * corporate use and closed source projects.   *
 *  *
 * The GNU Public License (GPL) is probably most appropriate for inclusion in  *
 * other open source projects.  *
 *

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-02-07 05:01  agsXMPP-WinFormIM-master\
     文件          38  2017-02-07 05:01  agsXMPP-WinFormIM-master\.gitignore
     文件        1063  2017-02-07 05:01  agsXMPP-WinFormIM-master\LICENSE
     目录           0  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\
     文件        1078  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\App.ico
     文件        2486  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\AssemblyInfo.cs
     文件         198  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\ChatServers.xml
     文件       21061  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\JEP65Socket.cs
     文件       10905  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\MiniClient.csproj
     文件        1933  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\MiniClient.sln
     目录           0  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Properties\
     文件        7155  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Properties\Resources.Designer.cs
     文件        8743  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Properties\Resources.resx
     目录           0  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Resources\
     文件         613  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Resources\add.png
     文件         413  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Resources\comment.png
     文件         557  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Resources\comments.png
     文件         748  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Resources\connect.png
     文件         796  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Resources\disconnect.png
     文件         693  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Resources\door_in.png
     文件         753  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Resources\group.png
     文件         853  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Resources\package.png
     文件         791  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Resources\refresh.png
     文件         545  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Resources\search.png
     文件         746  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Resources\user_add.png
     文件         743  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Resources\user_comment.png
     文件         767  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Resources\user_delete.png
     文件         533  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Resources\vcard.png
     文件         692  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Resources\zoom.png
     文件         218  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Settings.xml
     目录           0  2017-02-07 05:01  agsXMPP-WinFormIM-master\MiniClient\Settings\
............此处省略546个文件信息

评论

共有 条评论