<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.8.0-dev (info@mypapit.net)" -->
<rss version="2.0" >
    <channel>
        <title>Forum AG-Software News</title>
        <description></description>
        <link>https://forum.ag-software.net/</link>
        <lastBuildDate>Tue, 14 Apr 2026 05:30:20 GMT</lastBuildDate>
        <generator>FeedCreator 1.8.0-dev (info@mypapit.net)</generator>
        <item>
            <title>Re: working with xmppdotnet library in .net core 3.1 (wpf)</title>
            <link>https://forum.ag-software.net/thread/2186-working-with-xmppdotnet-library-in-net-core-3-1</link>
            <description><![CDATA[
also, the URI you&nbsp; supply seems to be a BOSh endpoint, not the Websocket endpoint of your server.<br />
<br />
Alex
]]></description>
            <author> no_email@example.com (Alex)</author>
            <pubDate>Wed, 10 Apr 2024 13:45:35 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2186#11112</guid>
        </item>
        <item>
            <title>Re: working with xmppdotnet library in .net core 3.1 (wpf)</title>
            <link>https://forum.ag-software.net/thread/2186-working-with-xmppdotnet-library-in-net-core-3-1</link>
            <description><![CDATA[
1) can you get the Xml logs as described in the docs here?<br />
<a href="https://xmppdotnet.org/docs/logging/" title="https://xmppdotnet.org/docs/logging/">https://xmppdotnet.org/docs/logging/</a><br />
<br />
2) you should use a bare Jid without resource.<br />
3) Have you tried to connect with the console sample program from the Github repo?<br />
<br />
Alex
]]></description>
            <author> no_email@example.com (Alex)</author>
            <pubDate>Wed, 10 Apr 2024 13:34:09 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2186#11111</guid>
        </item>
        <item>
            <title>working with xmppdotnet library in .net core 3.1 (wpf)</title>
            <link>https://forum.ag-software.net/thread/2186-working-with-xmppdotnet-library-in-net-core-3-1</link>
            <description><![CDATA[
I am working with the XMPPDotNet library in a WPF framework .NET 3.1 Core. I want to create chat management system using xmpp. So, i used xmppdotnet library . I am providing all the details in the XMPPClient as mentioned in the documentation, but neither the connection is being established nor am I able to add to a group or send a message. Could you please guide me on how to accomplish these tasks? If there are any mistakes in the code, please correct them and let me know.<br />
this is my code<br />
<br />
<div class="code"><div class="csharp" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Collections.Generic</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Diagnostics</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Linq</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Net.Mail</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Net.WebSockets</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Reactive.Linq</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Reflection</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Text</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Threading</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Threading.Tasks</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Windows</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Windows.Controls</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Windows.Data</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Windows.Documents</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Windows.Input</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Windows.Media</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Windows.Media.Imaging</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Windows.Navigation</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Windows.Shapes</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Xml.Linq</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">XmppDotNet</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">XmppDotNet.Extensions.Client.Message</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">XmppDotNet.Extensions.Client.Presence</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">XmppDotNet.Extensions.Client.Roster</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">XmppDotNet.Transport</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">XmppDotNet.Transport.Socket</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">XmppDotNet.Transport.WebSocket</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">XmppDotNet.Xmpp</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">XmppDotNet.Xmpp.Client</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">namespace</span> xmppdemo_new</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// &lt;summary&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// Interaction logic for MainWindow.xaml</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// &lt;/summary&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">partial</span> <span style="color: #6666cc; font-weight: bold;">class</span> MainWindow <span style="color: #008000;">:</span> Window</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; XmppClient xmppClient<span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6666cc; font-weight: bold;">int</span> websocketRetries <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span> <span style="color: #008080; font-style: italic;">// Track number of WebSocket attempts</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">public</span> MainWindow<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; InitializeComponent<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">async</span> <span style="color: #6666cc; font-weight: bold;">void</span> Connect<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">try</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// Attempt WebSocket connection first (preferred)</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmppClient <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> XmppClient<span style="color: #008000;">&#40;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conf <span style="color: #008000;">=&gt;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conf<span style="color: #008000;">.</span><span style="color: #0000FF;">UseWebSocketTransport</span><span style="color: #008000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> StaticNameResolver<span style="color: #008000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Uri<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;wss://chat-new.educrypt.ai:5443/bosh&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conf<span style="color: #008000;">.</span><span style="color: #0000FF;">AutoReconnect</span> <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Jid <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;740@chat-new.educrypt.ai:5443/bosh&quot;</span>,</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Password <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;740&quot;</span>,</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Tls <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">true</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">await</span> xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">ConnectAsync</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; websocketRetries <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span> <span style="color: #008080; font-style: italic;">// Reset retries on successful connection</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// Connection established using WebSocket</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// Rest of your code using xmppClient...</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">catch</span> <span style="color: #008000;">&#40;</span>WebSocketException ex<span style="color: #008000;">&#41;</span> when <span style="color: #008000;">&#40;</span>ex<span style="color: #008000;">.</span><span style="color: #0000FF;">Message</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Contains</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;status code '200'&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; websocketRetries<span style="color: #008000;">++;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// Check if retries exceed a limit (optional)</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>websocketRetries <span style="color: #008000;">&gt;</span> <span style="color: #FF0000;">3</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MessageBox<span style="color: #008000;">.</span><span style="color: #0000FF;">Show</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;WebSocket connection failed repeatedly, using TCP socket instead.&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// Fallback to TCP socket</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmppClient <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> XmppClient<span style="color: #008000;">&#40;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conf <span style="color: #008000;">=&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conf<span style="color: #008000;">.</span><span style="color: #0000FF;">Transport</span> <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> SocketTransport<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> <span style="color: #008080; font-style: italic;">// Use SocketTransport for TCP</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conf<span style="color: #008000;">.</span><span style="color: #0000FF;">AutoReconnect</span> <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Jid <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;740@chat-new.educrypt.ai&quot;</span>,</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Password <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;740&quot;</span>,</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Tls <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">true</span>,</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">await</span> xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">ConnectAsync</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// Connection established using TCP socket</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// Rest of your code using xmppClient...</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// Rest of your connection established logic...</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmppClient</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">.</span><span style="color: #0000FF;">StateChanged</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">.</span><span style="color: #0600FF; font-weight: bold;">Where</span><span style="color: #008000;">&#40;</span>s <span style="color: #008000;">=&gt;</span> s <span style="color: #008000;">==</span> SessionState<span style="color: #008000;">.</span><span style="color: #0000FF;">Binded</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">.</span><span style="color: #0000FF;">Subscribe</span><span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">async</span> v <span style="color: #008000;">=&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// request roster (contact list).</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// This is optional, but most chat clients do this on startup</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">var</span> roster <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">await</span> xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">RequestRosterAsync</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// send our online presence to the server</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">await</span> xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">SendPresenceAsync</span><span style="color: #008000;">&#40;</span>XmppDotNet<span style="color: #008000;">.</span><span style="color: #0000FF;">Xmpp</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Show</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Chat</span>, <span style="color: #666666;">&quot;free for chat&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// send a chat message to user2</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">await</span> xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">SendGroupChatMessageAsync</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;1712213988412@conference.chat-new.educrypt.ai&quot;</span>, <span style="color: #666666;">&quot;This is a test&quot;</span>,<span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #0600FF; font-weight: bold;">async</span> <span style="color: #6666cc; font-weight: bold;">void</span> Button_Click<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, RoutedEventArgs e<span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">var</span> vcardRequest <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> VcardIq <span style="color: #008000;">&#123;</span> Type <span style="color: #008000;">=</span> IqType<span style="color: #008000;">.</span><span style="color: #0600FF; font-weight: bold;">Get</span>, To <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;740@chat-new.educrypt.ai&quot;</span> <span style="color: #008000;">&#125;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// send the request and await the response</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">var</span> resultIq <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">await</span> xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">SendIqAsync</span><span style="color: #008000;">&#40;</span>vcardRequest<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// check for success or failure</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>resultIq<span style="color: #008000;">.</span><span style="color: #0000FF;">Type</span> <span style="color: #008000;">==</span> IqType<span style="color: #008000;">.</span><span style="color: #0000FF;">Result</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// server returned a result (sucsess)</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// =&gt; process the vCard here</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">else</span> <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>resultIq<span style="color: #008000;">.</span><span style="color: #0000FF;">Type</span> <span style="color: #008000;">==</span> IqType<span style="color: #008000;">.</span><span style="color: #0000FF;">Error</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// server returned an error</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// =&gt; handle error</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> Window_Loaded<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, RoutedEventArgs e<span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Connect<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#125;</span></div></li>
</ol></div></div><br />
thanks ,please solve my
]]></description>
            <author> no_email@example.com (lokeshdotnet)</author>
            <pubDate>Wed, 10 Apr 2024 11:20:40 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2186#11110</guid>
        </item>
        <item>
            <title>Re: Unable to connect to CISCO Finesse secure port 5223</title>
            <link>https://forum.ag-software.net/thread/2185-Unable-to-connect-to-CISCO-Finesse-secure-port-52</link>
            <description><![CDATA[
demo licenses are valid for 30 days. You can use it to verify if it solves your problem. When you move that code to production then you must use a valid license, otherwise your production code will stop working after some days.<br />
<br />
Alex
]]></description>
            <author> no_email@example.com (Alex)</author>
            <pubDate>Tue, 04 Oct 2022 14:36:30 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2185#11109</guid>
        </item>
        <item>
            <title>Re: Unable to connect to CISCO Finesse secure port 5223</title>
            <link>https://forum.ag-software.net/thread/2185-Unable-to-connect-to-CISCO-Finesse-secure-port-52</link>
            <description><![CDATA[
Hi Alex,<br />
Thank you for reply.<br />
<br />
Can we use this license on our production environment?
]]></description>
            <author> no_email@example.com (Bhush.bhadane)</author>
            <pubDate>Tue, 04 Oct 2022 14:32:59 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2185#11108</guid>
        </item>
        <item>
            <title>Re: Unable to connect to CISCO Finesse secure port 5223</title>
            <link>https://forum.ag-software.net/thread/2185-Unable-to-connect-to-CISCO-Finesse-secure-port-52</link>
            <description><![CDATA[
I assume your license is not valid for the latest builds. Please get a demo license from here for your tests:<br />
<a href="https://www.ag-software.net/matrix-xmpp-sdk/request-demo-license/" title="https://www.ag-software.net/matrix-xmpp-sdk/request-demo-license/">https://www.ag-software.net/matrix-xmpp-sdk/request-demo-l…</a><br />
<br />
Alex
]]></description>
            <author> no_email@example.com (Alex)</author>
            <pubDate>Tue, 04 Oct 2022 13:53:13 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2185#11107</guid>
        </item>
        <item>
            <title>Re: Unable to connect to CISCO Finesse secure port 5223</title>
            <link>https://forum.ag-software.net/thread/2185-Unable-to-connect-to-CISCO-Finesse-secure-port-52</link>
            <description><![CDATA[
Hi Alex,<br />
<br />
We upgraded nuget to the latest 2.1.0.8. <br />
<br />
After upgrading we are getting following error on XmppClient.Open()<br />
<br />
<div class="code">System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application. <br />
&nbsp;&nbsp; at System.Windows.Forms.Form.ShowDialog(IWin32Window owner) <br />
&nbsp;&nbsp; at System.Windows.Forms.Form.ShowDialog() <br />
&nbsp;&nbsp; at Matrix.License.LicenseManager.CheckLicense() <br />
&nbsp;&nbsp; at Matrix.XmppStream.Open() <br />
&nbsp;&nbsp; at Matrix.Xmpp.Client.XmppClient.Open()</div><br />
Do we need to update the License as well when we upgrade to latest MatriX nuget ? <br />
If so can you please help.
]]></description>
            <author> no_email@example.com (Bhush.bhadane)</author>
            <pubDate>Tue, 04 Oct 2022 12:22:18 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2185#11106</guid>
        </item>
        <item>
            <title>Re: Unable to connect to CISCO Finesse secure port 5223</title>
            <link>https://forum.ag-software.net/thread/2185-Unable-to-connect-to-CISCO-Finesse-secure-port-52</link>
            <description><![CDATA[
Thank you Alex!<br />
<br />
As suggested we will update to latest Nuget Package version 2.1.8 and will verify if its working.
]]></description>
            <author> no_email@example.com (Bhush.bhadane)</author>
            <pubDate>Thu, 29 Sep 2022 08:23:01 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2185#11105</guid>
        </item>
        <item>
            <title>Re: Unable to connect to CISCO Finesse secure port 5223</title>
            <link>https://forum.ag-software.net/thread/2185-Unable-to-connect-to-CISCO-Finesse-secure-port-52</link>
            <description><![CDATA[
There is no specific document for this.<br />
The code you posted above is correct.<br />
<br />
In previous days it was called old style TLS/SSL when StartTLS was preferred. It became popular again now because compared to StartTLS it saves roundtrips and therefore setting up the stream is faster. And these days its called direct TLS. But its exactly the same.<br />
We have not renamed the property in legacy Matrix.<br />
<br />
Alex
]]></description>
            <author> no_email@example.com (Alex)</author>
            <pubDate>Thu, 29 Sep 2022 08:06:49 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2185#11104</guid>
        </item>
        <item>
            <title>Re: Unable to connect to CISCO Finesse secure port 5223</title>
            <link>https://forum.ag-software.net/thread/2185-Unable-to-connect-to-CISCO-Finesse-secure-port-52</link>
            <description><![CDATA[
Where can I find the document related to direct TLS ?
]]></description>
            <author> no_email@example.com (Bhush.bhadane)</author>
            <pubDate>Thu, 29 Sep 2022 07:58:04 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2185#11103</guid>
        </item>
        <item>
            <title>Re: Unable to connect to CISCO Finesse secure port 5223</title>
            <link>https://forum.ag-software.net/thread/2185-Unable-to-connect-to-CISCO-Finesse-secure-port-52</link>
            <description><![CDATA[
This is not the latest. Please update and try again.<br />
There was work done for direct TLS in the recent releases.<br />
<br />
Alex
]]></description>
            <author> no_email@example.com (Alex)</author>
            <pubDate>Thu, 29 Sep 2022 07:25:11 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2185#11102</guid>
        </item>
        <item>
            <title>Re: Unable to connect to CISCO Finesse secure port 5223</title>
            <link>https://forum.ag-software.net/thread/2185-Unable-to-connect-to-CISCO-Finesse-secure-port-52</link>
            <description><![CDATA[
Using 2.1.0.5
]]></description>
            <author> no_email@example.com (Bhush.bhadane)</author>
            <pubDate>Thu, 29 Sep 2022 07:14:52 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2185#11101</guid>
        </item>
        <item>
            <title>Re: Unable to connect to CISCO Finesse secure port 5223</title>
            <link>https://forum.ag-software.net/thread/2185-Unable-to-connect-to-CISCO-Finesse-secure-port-52</link>
            <description><![CDATA[
Are you using the latest release of Matrix?<br />
<br />
Alex
]]></description>
            <author> no_email@example.com (Alex)</author>
            <pubDate>Thu, 29 Sep 2022 06:59:37 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2185#11100</guid>
        </item>
        <item>
            <title>Unable to connect to CISCO Finesse secure port 5223 (How to use TLS 1.2 from Matrix)</title>
            <link>https://forum.ag-software.net/thread/2185-Unable-to-connect-to-CISCO-Finesse-secure-port-52</link>
            <description><![CDATA[
We are trying to connect to CISCO finesse secure port 5223 using Matrix Library for Notifications. Using Pidgin it is working prfectly but from our application its not.<br />
<br />
When we comare wireshark logs for both then we can see that Pidgin request using TLS1.2 where as Matrix request using TLSv1.<br />
So as per the post in this forum we are setting the TLS12 explicitely but its still not working.<br />
<br />
Here is the code:<br />
<br />
<div class="code"><div class="csharp" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">xmppClient</span><span style="color: #008000;">.</span><span style="color: #0000FF;">SetUsername</span><span style="color: #008000;">&#40;</span>username<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">xmppClient</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Password</span> <span style="color: #008000;">=</span> password<span style="color: #008000;">.</span><span style="color: #0000FF;">ToUnsecureString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">xmppClient</span><span style="color: #008000;">.</span><span style="color: #0000FF;">SetXmppDomain</span><span style="color: #008000;">&#40;</span>domain<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">xmppClient</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Port</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">5223</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">xmppClient</span><span style="color: #008000;">.</span><span style="color: #0000FF;">OldStyleSsl</span> <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">xmppClient</span><span style="color: #008000;">.</span><span style="color: #0000FF;">TlsProtocols</span> <span style="color: #008000;">=</span> SslProtocols<span style="color: #008000;">.</span><span style="color: #0000FF;">Tls12</span><span style="color: #008000;">;</span></div></li>
</ol></div></div><br />
<br />
Can you help us what we are missing here so that matrix will use the TLS 1.2
]]></description>
            <author> no_email@example.com (Bhush.bhadane)</author>
            <pubDate>Thu, 29 Sep 2022 05:45:17 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2185#11099</guid>
        </item>
        <item>
            <title>Re: Matrix XMMP - How to retrieve stanza from archived messages.</title>
            <link>https://forum.ag-software.net/thread/2184-Matrix-XMMP-How-to-retrieve-stanza-from-archived</link>
            <description><![CDATA[
Yes you were right. Using the XEP-0313 I have managed to retrieve it. Thank you for your help.
]]></description>
            <author> no_email@example.com (Anastasis Ksenos)</author>
            <pubDate>Fri, 15 Apr 2022 08:29:53 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2184#11098</guid>
        </item>
        <item>
            <title>Re: Matrix XMMP - How to retrieve stanza from archived messages.</title>
            <link>https://forum.ag-software.net/thread/2184-Matrix-XMMP-How-to-retrieve-stanza-from-archived</link>
            <description><![CDATA[
Hello Anastasis,<br />
<br />
it looks to me like you are using the older and deprecated extension:<br />
<a href="https://xmpp.org/extensions/xep-0136.html" title="https://xmpp.org/extensions/xep-0136.html">XEP-0136: Message Archiving</a><br />
<br />
But I was suggesting to use:<br />
<a href="https://xmpp.org/extensions/xep-0313.html" title="https://xmpp.org/extensions/xep-0313.html">XEP-0313: Message Archive Management</a><br />
<br />
And see there in example 17 how the server would send you the original message under the &lt;forwarded/&gt; tag:<br />
<a href="https://xmpp.org/extensions/xep-0313.html#results" title="https://xmpp.org/extensions/xep-0313.html#results">https://xmpp.org/extensions/xep-0313.html#results</a><br />
<br />
Alex
]]></description>
            <author> no_email@example.com (Alex)</author>
            <pubDate>Thu, 14 Apr 2022 11:20:02 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2184#11097</guid>
        </item>
        <item>
            <title>Re: Matrix XMMP - How to retrieve stanza from archived messages.</title>
            <link>https://forum.ag-software.net/thread/2184-Matrix-XMMP-How-to-retrieve-stanza-from-archived</link>
            <description><![CDATA[
Hello Alex,<br />
<br />
Thank you for the quick response. I studied the extension but I am not sure how to implement it. Let my share my code<br />
<br />
<div class="code"><div class="csharp" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> RetrieveArchivedMessages<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">string</span> with<span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">var</span> query <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">Xmpp</span><span style="color: #008000;">.</span><span style="color: #0000FF;">MessageArchiving</span><span style="color: #008000;">.</span><span style="color: #0000FF;">List</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; With <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">Jid</span><span style="color: #008000;">&#40;</span>with<span style="color: #008000;">&#41;</span>,</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ResultSet <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">Xmpp</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ResultSetManagement</span><span style="color: #008000;">.</span><span style="color: #0600FF; font-weight: bold;">Set</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">var</span> request <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">Xmpp</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Client</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Iq</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Type <span style="color: #008000;">=</span> Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">Xmpp</span><span style="color: #008000;">.</span><span style="color: #0000FF;">IqType</span><span style="color: #008000;">.</span><span style="color: #0600FF; font-weight: bold;">Get</span>,</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Query <span style="color: #008000;">=</span> query</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; request<span style="color: #008000;">.</span><span style="color: #0000FF;">GenerateId</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Client</span><span style="color: #008000;">.</span><span style="color: #0000FF;">IqFilter</span><span style="color: #008000;">.</span><span style="color: #0000FF;">SendIq</span><span style="color: #008000;">&#40;</span>request, RetrieveSessionsListCallback<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> RetrieveSessionsListCallback<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, IqEventArgs e<span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>e<span style="color: #008000;">.</span><span style="color: #0000FF;">Iq</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Type</span> <span style="color: #008000;">!=</span> Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">Xmpp</span><span style="color: #008000;">.</span><span style="color: #0000FF;">IqType</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Result</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">return</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">var</span> sessions <span style="color: #008000;">=</span> e<span style="color: #008000;">.</span><span style="color: #0000FF;">Iq</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Element</span><span style="color: #008000;">&lt;</span>Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">Xmpp</span><span style="color: #008000;">.</span><span style="color: #0000FF;">MessageArchiving</span><span style="color: #008000;">.</span><span style="color: #0000FF;">List</span><span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>sessions <span style="color: #008000;">==</span> <span style="color: #0600FF; font-weight: bold;">null</span> <span style="color: #008000;">||</span> sessions<span style="color: #008000;">.</span><span style="color: #0000FF;">Elements</span><span style="color: #008000;">&lt;</span>Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">Xmpp</span><span style="color: #008000;">.</span><span style="color: #0000FF;">MessageArchiving</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Chat</span><span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Count</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">==</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">return</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">foreach</span> <span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">var</span> session <span style="color: #0600FF; font-weight: bold;">in</span> sessions<span style="color: #008000;">.</span><span style="color: #0000FF;">Elements</span><span style="color: #008000;">&lt;</span>Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">Xmpp</span><span style="color: #008000;">.</span><span style="color: #0000FF;">MessageArchiving</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Chat</span><span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RetrieveChatSession<span style="color: #008000;">&#40;</span>session<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> RetrieveChatSession<span style="color: #008000;">&#40;</span>Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">Xmpp</span><span style="color: #008000;">.</span><span style="color: #0000FF;">MessageArchiving</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Chat</span> session<span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>session <span style="color: #008000;">==</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">return</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">var</span> query <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">Xmpp</span><span style="color: #008000;">.</span><span style="color: #0000FF;">MessageArchiving</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Retrieve</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; With <span style="color: #008000;">=</span> session<span style="color: #008000;">.</span><span style="color: #0000FF;">With</span>,</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Start <span style="color: #008000;">=</span> session<span style="color: #008000;">.</span><span style="color: #0000FF;">Start</span>,</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ResultSet <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">Xmpp</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ResultSetManagement</span><span style="color: #008000;">.</span><span style="color: #0600FF; font-weight: bold;">Set</span> <span style="color: #008000;">&#123;</span> Maximum <span style="color: #008000;">=</span> <span style="color: #FF0000;">100</span> <span style="color: #008000;">&#125;</span>, </div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">var</span> request <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">Xmpp</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Client</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Iq</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Type <span style="color: #008000;">=</span> Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">Xmpp</span><span style="color: #008000;">.</span><span style="color: #0000FF;">IqType</span><span style="color: #008000;">.</span><span style="color: #0600FF; font-weight: bold;">Get</span>,</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Query <span style="color: #008000;">=</span> query</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; request<span style="color: #008000;">.</span><span style="color: #0000FF;">GenerateId</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Client</span><span style="color: #008000;">.</span><span style="color: #0000FF;">IqFilter</span><span style="color: #008000;">.</span><span style="color: #0000FF;">SendIq</span><span style="color: #008000;">&#40;</span>request, RetrieveSessionMessagesCallback<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> RetrieveSessionMessagesCallback<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, IqEventArgs e<span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>e<span style="color: #008000;">.</span><span style="color: #0000FF;">Iq</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Type</span> <span style="color: #008000;">!=</span> Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">Xmpp</span><span style="color: #008000;">.</span><span style="color: #0000FF;">IqType</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Result</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">return</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">var</span> chat <span style="color: #008000;">=</span> e<span style="color: #008000;">.</span><span style="color: #0000FF;">Iq</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Element</span><span style="color: #008000;">&lt;</span>Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">Xmpp</span><span style="color: #008000;">.</span><span style="color: #0000FF;">MessageArchiving</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Chat</span><span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>chat <span style="color: #008000;">==</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">return</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">var</span> items <span style="color: #008000;">=</span> chat<span style="color: #008000;">.</span><span style="color: #0000FF;">GetItems</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>items <span style="color: #008000;">==</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">return</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">var</span> start <span style="color: #008000;">=</span> chat<span style="color: #008000;">.</span><span style="color: #0000FF;">Start</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">var</span> list <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> <span style="color: #000000;">System.<span style="color: #0000FF;">Collections</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">Generic</span><span style="color: #008000;">.</span><span style="color: #0000FF;">List</span><span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">String</span><span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">foreach</span> <span style="color: #008000;">&#40;</span>Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">Xmpp</span><span style="color: #008000;">.</span><span style="color: #0000FF;">MessageArchiving</span><span style="color: #008000;">.</span><span style="color: #0000FF;">MessageItem</span> message <span style="color: #0600FF; font-weight: bold;">in</span> items<span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AddMessage<span style="color: #008000;">&#40;</span>message, start, list<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> AddMessage<span style="color: #008000;">&#40;</span>Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">Xmpp</span><span style="color: #008000;">.</span><span style="color: #0000FF;">MessageArchiving</span><span style="color: #008000;">.</span><span style="color: #0000FF;">MessageItem</span> message, DateTime startTime, <span style="color: #000000;">System.<span style="color: #0000FF;">Collections</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">Generic</span><span style="color: #008000;">.</span><span style="color: #0000FF;">List</span><span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">String</span><span style="color: #008000;">&gt;</span> list<span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>message <span style="color: #008000;">==</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">return</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">var</span> <span style="color: #0600FF; font-weight: bold;">from</span> <span style="color: #008000;">=</span> message<span style="color: #008000;">.</span><span style="color: #0000FF;">Jid</span><span style="color: #008000;">?.</span><span style="color: #0000FF;">Bare</span> <span style="color: #008000;">??</span> <span style="color: #666666;">&quot;me&quot;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; list<span style="color: #008000;">.</span><span style="color: #0600FF; font-weight: bold;">Add</span><span style="color: #008000;">&#40;</span>message<span style="color: #008000;">.</span><span style="color: #0000FF;">Body</span> <span style="color: #008000;">+</span> message<span style="color: #008000;">.</span><span style="color: #0000FF;">TimeStamp</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></li>
</ol></div></div><br />
The Matrix.Xmpp.MessageArchiving.MessageItem class does not contain a stanza property.<br />
<br />
I get the following response which does not contain the message stanza property. As I mentioned in my previous post the server does store the message stanza at the ofMessageArchive table but how we can retrieve it ?<br />
<br />
<div class="code"><div class="xml" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;iq</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;result&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;MX_5&quot;</span> <span style="color: #000066;">from</span>=<span style="color: #ff0000;">&quot;esmaster@ast-pc.soft.gr&quot;</span> <span style="color: #000066;">to</span>=<span style="color: #ff0000;">&quot;esmaster@ast-pc.soft.gr/AST-PC/9788&quot;</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;jabber:client&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;chat</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;urn:xmpp:archive&quot;</span> <span style="color: #000066;">with</span>=<span style="color: #ff0000;">&quot;esdev@ast-pc.soft.gr&quot;</span> <span style="color: #000066;">start</span>=<span style="color: #ff0000;">&quot;2022-04-13T11:57:58.855Z&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;to</span> <span style="color: #000066;">secs</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">jid</span>=<span style="color: #ff0000;">&quot;esdev@ast-pc.soft.gr&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>hello<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/to<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;to</span> <span style="color: #000066;">secs</span>=<span style="color: #ff0000;">&quot;4&quot;</span> <span style="color: #000066;">jid</span>=<span style="color: #ff0000;">&quot;esdev@ast-pc.soft.gr&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>test archive<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/to<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;to</span> <span style="color: #000066;">secs</span>=<span style="color: #ff0000;">&quot;20&quot;</span> <span style="color: #000066;">jid</span>=<span style="color: #ff0000;">&quot;esdev@ast-pc.soft.gr&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>???? ????????<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/to<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;to</span> <span style="color: #000066;">secs</span>=<span style="color: #ff0000;">&quot;17&quot;</span> <span style="color: #000066;">jid</span>=<span style="color: #ff0000;">&quot;esdev@ast-pc.soft.gr&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>???? ????????.xlsx<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/to<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;set</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://jabber.org/protocol/rsm&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;first</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/first<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;last<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/last<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;count<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>4<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/count<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/set<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/chat<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/iq<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li>
</ol></div></div>
]]></description>
            <author> no_email@example.com (Anastasis Ksenos)</author>
            <pubDate>Thu, 14 Apr 2022 09:07:27 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2184#11096</guid>
        </item>
        <item>
            <title>Re: Matrix XMMP - How to retrieve stanza from archived messages.</title>
            <link>https://forum.ag-software.net/thread/2184-Matrix-XMMP-How-to-retrieve-stanza-from-archived</link>
            <description><![CDATA[
Hello Anastasis,<br />
<br />
I think what you are looking for is the following extension:<br />
<a href="https://xmpp.org/extensions/xep-0313.html" title="https://xmpp.org/extensions/xep-0313.html">XEP-0313: Message Archive Management</a><br />
<br />
Can you study the extension and let me know if this is what you are looking for?<br />
When you have problems building the packets from the extension with MatriX then please let me know.<br />
<br />
Alex
]]></description>
            <author> no_email@example.com (Alex)</author>
            <pubDate>Wed, 13 Apr 2022 14:25:59 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2184#11095</guid>
        </item>
        <item>
            <title>Matrix XMMP - How to retrieve stanza from archived messages.</title>
            <link>https://forum.ag-software.net/thread/2184-Matrix-XMMP-How-to-retrieve-stanza-from-archived</link>
            <description><![CDATA[
Hello,<br />
<br />
We are using OpenFire version 4.7.1 with the Monitoring Service installed. Following the code which I found here :<a href="https://forum.ag-software.net/thread/2140-YAMAQ-Yet-another-message-archiving-question" title="https://forum.ag-software.net/thread/2140-YAMAQ-Yet-another-message-archiving-question">https://forum.ag-software.net/thread/2140-YAMAQ-Yet-anothe…</a> I have managed to retrieve archived messages body, however we have many scenarios which message body is not enough. We want to retrieve MessageArchive stanza as well. By executing the above query at the server database we find out that message stanza is stored at the data table but is there a way to retrieve it using matrix xmpp ? Any help would be appreciated.<br />
<br />
<div class="code">SELECT TOP (1000) [messageID]<br />
&nbsp;&nbsp; &nbsp;&nbsp; ,[conversationID]<br />
&nbsp;&nbsp; &nbsp;&nbsp; ,[fromJID]<br />
&nbsp;&nbsp; &nbsp;&nbsp; ,[fromJIDResource]<br />
&nbsp;&nbsp; &nbsp;&nbsp; ,[toJID]<br />
&nbsp;&nbsp; &nbsp;&nbsp; ,[toJIDResource]<br />
&nbsp;&nbsp; &nbsp;&nbsp; ,[sentDate]<br />
&nbsp;&nbsp; &nbsp;&nbsp; ,[stanza]<br />
&nbsp;&nbsp; &nbsp;&nbsp; ,[body]<br />
&nbsp;&nbsp; &nbsp;&nbsp; ,[isPMforJID]<br />
&nbsp; FROM [OpenFire].[dbo].[ofMessageArchive]</div>
]]></description>
            <author> no_email@example.com (Anastasis Ksenos)</author>
            <pubDate>Wed, 13 Apr 2022 13:48:11 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2184#11094</guid>
        </item>
        <item>
            <title>Re: General stability question</title>
            <link>https://forum.ag-software.net/thread/2183-General-stability-question</link>
            <description><![CDATA[
<blockquote class="quote"><div class="quote_inner"><div class="qname">Quote by OliverHall:</div>The same code moved to Xamarin.Forms and targeting an Android platform nearly works, and I can see my client joining the MUC room, but the SendAsync call never returns (eventually times out) (the offending line is shown below).<br />
<br />
<div class="code"><div class="csharp" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">await</span> _xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">SendAsync</span><span style="color: #008000;">&#40;</span>createRoomStanza, predicate, <span style="color: #FF0000;">10000</span>, CancellationToken<span style="color: #008000;">.</span><span style="color: #0000FF;">None</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
</ol></div></div></div></blockquote><br />
how does your predicate look?<br />
<br />
A predicate is usually used when the packet you send has a success or failure reply. It building a request/response pattern.<br />
For joining a Muc room there is no immediate success/failure reply from the server. Many people send it without predicate as fire and forget.<br />
<br />
The code I was referring to in my previous message is setting up a predicate to monitor incoming presence packets.<br />
Joining a MUC room is just sending a Presence packet to the room. And when this succeeds the rooms sends you back the presence of all participants. This is what I take here as the success criteria. Even when no other participants are in the room yet, then the server needs to send back your own participation (presence) for this room. So at least 1 presence packet should come back to you.<br />
<br />
<div class="code"><div class="csharp" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">async</span> Task<span style="color: #008000;">&lt;</span>XmppXElement<span style="color: #008000;">&gt;</span> EnterRoomAsync<span style="color: #008000;">&#40;</span>Jid jid, <span style="color: #6666cc; font-weight: bold;">string</span> nick<span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">var</span> createRoomStanza <span style="color: #008000;">=</span> CreateEnterRoomStanza<span style="color: #008000;">&#40;</span>jid, nick, <span style="color: #0600FF; font-weight: bold;">null</span>, <span style="color: #0600FF; font-weight: bold;">false</span>, <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; Func<span style="color: #008000;">&lt;</span>XmppXElement, <span style="color: #6666cc; font-weight: bold;">bool</span><span style="color: #008000;">&gt;</span> predicate <span style="color: #008000;">=</span> e <span style="color: #008000;">=&gt;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; e<span style="color: #008000;">.</span><span style="color: #0000FF;">OfType</span><span style="color: #008000;">&lt;</span>Presence<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&amp;&amp;</span> e<span style="color: #008000;">.</span><span style="color: #0000FF;">Cast</span><span style="color: #008000;">&lt;</span>Presence<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0600FF; font-weight: bold;">From</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Equals</span><span style="color: #008000;">&#40;</span>jid, <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> BareJidComparer<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">return</span> <span style="color: #0600FF; font-weight: bold;">await</span> XmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">SendAsync</span><span style="color: #008000;">&#40;</span>createRoomStanza, predicate, <span style="color: #FF0000;">10000</span>, CancellationToken<span style="color: #008000;">.</span><span style="color: #0000FF;">None</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ConfigureAwait</span><span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#125;</span></div></li>
</ol></div></div><br />
Alex
]]></description>
            <author> no_email@example.com (Alex)</author>
            <pubDate>Mon, 07 Mar 2022 10:39:34 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2183#11093</guid>
        </item>
        <item>
            <title>Re: General stability question</title>
            <link>https://forum.ag-software.net/thread/2183-General-stability-question</link>
            <description><![CDATA[
Hello Oliver,<br />
<br />
MatriX vNext works fine on Xamarin. We have many users of it on Xamarin. and we have hundreds of users worldwide using it in many different applications on all kind of platforms.<br />
<br />
<i><b>Some hints for Xamarin development:</b></i><br />
When MatriX vNext was first released we decided to use the great DotNetty networking stack which offers great extensibility and high performance, also for server applications. But DotNetty development seems to be abandoned by the developers and also support seems non existing in the GitHug pages and other channels. Also in Mono which is being used by Xamarin there have been some TLS issues with DotNetty.<br />
Because of the reasons above we replaced the DotNetty networking stack with standard .NET sockets and websockets. We did this at the same time as we added .Net5 compatibility.<br />
You can find the latest and stable code for this in the <b>net5</b> branch here:<br />
<a href="https://github.com/matrix-xmpp/matrix-vnext/tree/net5" title="https://github.com/matrix-xmpp/matrix-vnext/tree/net5">https://github.com/matrix-xmpp/matrix-vnext/tree/net5</a><br />
<br />
Also recently I decided to rename MatriX vNext to XmppDotNet. Because there always has been confusion between MatriX and vNext and also with the Matrix chat protocol which is not related to XMPP. You can find pre-release packages for XmppDotNet on Nuget. All the sources will be made open on GitHub soon. Currently XmppDotNet is based on vNext`s net5 branch. Only the namespaces and packet names were changed.<br />
<br />
For joining a GroupChat please look at the MucManager here in the sample code:<br />
<a href="https://github.com/matrix-xmpp/matrix-vnext/blob/net5/examples/ConsoleClient/MucManager.cs" title="https://github.com/matrix-xmpp/matrix-vnext/blob/net5/examples/ConsoleClient/MucManager.cs">https://github.com/matrix-xmpp/matrix-vnext/blob/net5/exam…</a><br />
This code will be extended soon and moved to XmppDotNet<br />
<br />
MatriX is active in development. With the name change to XmppDortNet you can expect more activity on NuGet soon again.<br />
But also XMPP is a stable protocol since 2 decades. Unless there are bugs or new extensions requested by users there is not really a reason for pushing new packages. Most of the recent changes are related to netCore, because there were many changes since the initial 1.0 release.<br />
<br />
I am aware that documentation could be better. The forum here also offers a lot of help and I am always trying to offer quick help here. So when more questions come up then just ask.<br />
The website repo for XmppDotNet will be made public as well soon. So help for docs from the community is welcome.<br />
<br />
Alex
]]></description>
            <author> no_email@example.com (Alex)</author>
            <pubDate>Mon, 07 Mar 2022 10:14:26 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2183#11092</guid>
        </item>
        <item>
            <title>General stability question</title>
            <link>https://forum.ag-software.net/thread/2183-General-stability-question</link>
            <description><![CDATA[
Hi,<br />
I'm trying to write an XMPP client using Xamarin.Forms and MatriX vNext looked like a good place to get a spring board into getting something working.<br />
<br />
I have to admit, I've found the docs/samples (or rather lack of) makes the process pretty painful.&nbsp; Finding some sample code to join a MUC room was luck, more than following any documentation pointers and the API is so LINQ heavy, without any API docs, I've found it very much a trial and error exercise to get things working.&nbsp; I hope I'm just missing some rich repository of information, but I've looked and searched Google and there doesn't appear to be anything?<br />
<br />
So - I did eventually get a client to join a group chat, and post a message using native Windows .Net Framework.<br />
<br />
The same code moved to Xamarin.Forms and targeting an Android platform nearly works, and I can see my client joining the MUC room, but the SendAsync call never returns (eventually times out) (the offending line is shown below).<br />
<br />
<div class="code"><div class="csharp" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">await</span> _xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">SendAsync</span><span style="color: #008000;">&#40;</span>createRoomStanza, predicate, <span style="color: #FF0000;">10000</span>, CancellationToken<span style="color: #008000;">.</span><span style="color: #0000FF;">None</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
</ol></div></div><br />
Should the library work in this context or am I flogging the proverbial "dead horse" with MatriX vNext?<br />
<br />
I see that the last NuGet update is from 2020; is this project dormant now?&nbsp; XMPP support for .Net seems thin on the ground sadly!&nbsp; Any other suggestions?&nbsp; I don't need anything particularly fancy.<br />
<br />
Many thanks,<br />
Oliver
]]></description>
            <author> no_email@example.com (OliverHall)</author>
            <pubDate>Sun, 06 Mar 2022 17:24:44 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2183#11091</guid>
        </item>
        <item>
            <title>Re: Xamarin iOS - DotNetty.Transport.Channels.ClosedChannelException</title>
            <link>https://forum.ag-software.net/thread/2182-Xamarin-iOS-DotNetty-Transport-Channels-ClosedCh</link>
            <description><![CDATA[
np - thank you for your help!
]]></description>
            <author> no_email@example.com (pcharlton@carbonlabs.co.uk)</author>
            <pubDate>Tue, 30 Nov 2021 09:50:33 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2182#11090</guid>
        </item>
        <item>
            <title>Re: Xamarin iOS - DotNetty.Transport.Channels.ClosedChannelException</title>
            <link>https://forum.ag-software.net/thread/2182-Xamarin-iOS-DotNetty-Transport-Channels-ClosedCh</link>
            <description><![CDATA[
Nuget packages from CI are currently on the MyGet feed where you can find instructions for here:<br />
<a href="https://matrix-xmpp.io/docs/install-from-nuget/" title="https://matrix-xmpp.io/docs/install-from-nuget/">https://matrix-xmpp.io/docs/install-from-nuget/</a><br />
<br />
<br />
They should go soon to Nuget as well. But we have not decided yet on the package name. Because this should also replace all legacy MatriX packages in the future.<br />
With the replacement of DotNetty a major redesign was required. Which means the API also changed a bit. You cannot just replace the library. I suggest to take a look at the code and samples as well.<br />
<br />
Alex
]]></description>
            <author> no_email@example.com (Alex)</author>
            <pubDate>Tue, 30 Nov 2021 09:49:49 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2182#11089</guid>
        </item>
        <item>
            <title>Re: Xamarin iOS - DotNetty.Transport.Channels.ClosedChannelException</title>
            <link>https://forum.ag-software.net/thread/2182-Xamarin-iOS-DotNetty-Transport-Channels-ClosedCh</link>
            <description><![CDATA[
Okay, I'll do that.&nbsp; Does that branch go to a nuget repository or is it a build locally kind of thing?<br />
<br />
Paul.
]]></description>
            <author> no_email@example.com (pcharlton@carbonlabs.co.uk)</author>
            <pubDate>Tue, 30 Nov 2021 07:40:43 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2182#11088</guid>
        </item>
        <item>
            <title>Re: Xamarin iOS - DotNetty.Transport.Channels.ClosedChannelException</title>
            <link>https://forum.ag-software.net/thread/2182-Xamarin-iOS-DotNetty-Transport-Channels-ClosedCh</link>
            <description><![CDATA[
Hey Paul,<br />
<br />
you can check if the KeepAliveHandler is terminating fine when you close your connection.<br />
Apart from that I am highly suggesting that you switch to the latest code in the net5 branch on Github. Because DotNetty seems to be not in development anymore-<br />
<br />
See also:<br />
<a href="https://github.com/matrix-xmpp/matrix-vnext/tree/net5" title="https://github.com/matrix-xmpp/matrix-vnext/tree/net5">https://github.com/matrix-xmpp/matrix-vnext/tree/net5</a><br />
<br />
Alex
]]></description>
            <author> no_email@example.com (Alex)</author>
            <pubDate>Mon, 29 Nov 2021 17:12:05 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2182#11087</guid>
        </item>
        <item>
            <title>Xamarin iOS - DotNetty.Transport.Channels.ClosedChannelException</title>
            <link>https://forum.ag-software.net/thread/2182-Xamarin-iOS-DotNetty-Transport-Channels-ClosedCh</link>
            <description><![CDATA[
Hi,<br />
I'm getting this exception generated intermittently I think when the app/phone goes into sleep mode.&nbsp; It's ahrd to recreate but my error log system is pickig them up.<br />
<br />
I've added some code that tries to monitor when the app goes to sleep and disconnect the XmppClient which I think has caught a lot of these incidents, but some still seem to be slipping through.<br />
<br />
It seems to be caused by the KeepAliveHandler.&nbsp; I was wondering if there was anythign I could lookat from the calling code (in the pipeline perhaps) or whether this was mode something that needed handling in the underlying code.<br />
<br />
<br />
<div class="code">Xamarin Exception Stack:<br />
DotNetty.Transport.Channels.ClosedChannelException: I/O error occurred.<br />
&nbsp; at Matrix.Network.Handlers.KeepAliveHandler+&lt;&gt;c__DisplayClass4_0.&lt;ChannelActive&gt;b__0 (System.Object state) &lt;0x1075f9230 + 0x001bf&gt; in &lt;2b86b82b658d4c92bfd52eb72504d791#ce8736efb5b41d616940f6b40b6f6dce&gt;:0<br />
&nbsp; at System.Runtime.CompilerServices.AsyncMethodBuilderCore+&lt;&gt;c.&lt;ThrowAsync&gt;b__7_1 (System.Object state) &lt;0x1016545d8 + 0x00067&gt; in &lt;218435b0f6654ac1ab0cdd176f26b9bd#ce8736efb5b41d616940f6b40b6f6dce&gt;:0<br />
&nbsp; at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) &lt;0x1015e9790 + 0x0005b&gt; in &lt;218435b0f6654ac1ab0cdd176f26b9bd#ce8736efb5b41d616940f6b40b6f6dce&gt;:0<br />
&nbsp; at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) &lt;0x1015e2cf8 + 0x0015f&gt; in &lt;218435b0f6654ac1ab0cdd176f26b9bd#ce8736efb5b41d616940f6b40b6f6dce&gt;:0<br />
&nbsp; at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) &lt;0x1015e2c3c + 0x00043&gt; in &lt;218435b0f6654ac1ab0cdd176f26b9bd#ce8736efb5b41d616940f6b40b6f6dce&gt;:0<br />
&nbsp; at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () &lt;0x1015e96f0 + 0x00047&gt; in &lt;218435b0f6654ac1ab0cdd176f26b9bd#ce8736efb5b41d616940f6b40b6f6dce&gt;:0<br />
&nbsp; at System.Threading.ThreadPoolWorkQueue.Dispatch () &lt;0x1013bc5c0 + 0x001e7&gt; in &lt;218435b0f6654ac1ab0cdd176f26b9bd#ce8736efb5b41d616940f6b40b6f6dce&gt;:0<br />
&nbsp; at ObjCRuntime.Runtime.ThreadPoolDispatcher (System.Func`1[TResult] callback) &lt;0x1025c1fa4 + 0x00053&gt; in &lt;149d342757e54bfaa120bb42afe18369#ce8736efb5b41d616940f6b40b6f6dce&gt;:0<br />
&nbsp; at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () &lt;0x1015e9588 + 0x00077&gt; in &lt;218435b0f6654ac1ab0cdd176f26b9bd#ce8736efb5b41d616940f6b40b6f6dce&gt;:0</div><br />
All the best,<br />
Paul.
]]></description>
            <author> no_email@example.com (pcharlton@carbonlabs.co.uk)</author>
            <pubDate>Mon, 29 Nov 2021 17:03:19 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2182#11086</guid>
        </item>
        <item>
            <title>Re: Finesse Notification</title>
            <link>https://forum.ag-software.net/thread/2181-Finesse-Notification</link>
            <description><![CDATA[
It looks like you are using BOSH as transport layer. And according to the exception there seems to be a SSL/TLS issue with your server.<br />
When you are using an invalid Tls certificate for some reason then you can handle it yourself for BOSH connections with the .NET <b>ServicePointManager.ServerCertificateValidationCallback</b>.<br />
By default connections with invalid and untrusted certificates get rejected in .NET
]]></description>
            <author> no_email@example.com (Alex)</author>
            <pubDate>Fri, 12 Nov 2021 09:01:00 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2181#11085</guid>
        </item>
        <item>
            <title>Finesse Notification (Finesse Notification)</title>
            <link>https://forum.ag-software.net/thread/2181-Finesse-Notification</link>
            <description><![CDATA[
I am new to MatriX. I want to get pidgin notifications/events in my C# .NET console application.<br />
<br />
With this code implementation, I am getting exception&nbsp; <b>M_xmppClient_OnError</b> event (BOSH exception ,Message = "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.")<br />
<div class="code"><div class="csharp" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">XmppClient m_xmppClient <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> XmppClient<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">m_xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">Transport</span> <span style="color: #008000;">=</span> Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">Net</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Transport</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Bosh</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">m_xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">Hostname</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;abc.com&quot;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">m_xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">Username</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;user_name&quot;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">m_xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">Password</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;password&quot;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">m_xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">Port</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">5222</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">m_xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">SetXmppDomain</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;https://abc.com&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">m_xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">AutoRoster</span> <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">m_xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">AutoPresence</span> <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">m_xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">OnMessage</span> <span style="color: #008000;">+=</span> M_xmppClient_OnMessage<span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">m_xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">OnReceiveXml</span> <span style="color: #008000;">+=</span> M_xmppClient_OnReceiveXml<span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">m_xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">OnBind</span> <span style="color: #008000;">+=</span> M_xmppClient_OnBind<span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">m_xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">OnValidateCertificate</span> <span style="color: #008000;">+=</span> M_xmppClient_OnValidateCertificate<span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">m_xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">OnLogin</span> <span style="color: #008000;">+=</span> M_xmppClient_OnLogin<span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">m_xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">OnError</span> <span style="color: #008000;">+=</span> M_xmppClient_OnError<span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">m_xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">OnAuthError</span> <span style="color: #008000;">+=</span> M_xmppClient_OnAuthError<span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">m_xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">Uri</span> <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> <span style="color: #000000;">System</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Uri</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;https://abc.com:7552/http-bind/&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">m_xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">KeepAliveInterval</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">60</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">m_xmppClient<span style="color: #008000;">.</span><span style="color: #0000FF;">Open</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">PubSubManager mgr <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> PubSubManager<span style="color: #008000;">&#40;</span>m_xmppClient<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">mgr<span style="color: #008000;">.</span><span style="color: #0000FF;">OnEvent</span> <span style="color: #008000;">+=</span> Mgr_OnEvent<span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> M_xmppClient_OnAuthError<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">Xmpp</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Sasl</span><span style="color: #008000;">.</span><span style="color: #0000FF;">SaslEventArgs</span> e<span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span>e<span style="color: #008000;">.</span><span style="color: #0000FF;">Exception</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> M_xmppClient_OnError<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">ExceptionEventArgs</span> e<span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span>e<span style="color: #008000;">.</span><span style="color: #0000FF;">Exception</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> M_xmppClient_OnLogin<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">EventArgs</span> e<span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span>e<span style="color: #008000;">.</span><span style="color: #0000FF;">State</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> M_xmppClient_OnValidateCertificate<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">CertificateEventArgs</span> e<span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; e<span style="color: #008000;">.</span><span style="color: #0000FF;">AcceptCertificate</span> <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> M_xmppClient_OnBind<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">JidEventArgs</span> e<span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;On bind: &nbsp;&quot;</span> <span style="color: #008000;">+</span> e<span style="color: #008000;">.</span><span style="color: #0000FF;">Jid</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> Mgr_OnEvent<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, MessageEventArgs e<span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span>e<span style="color: #008000;">.</span><span style="color: #0000FF;">Message</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> M_xmppClient_OnReceiveXml<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, Matrix<span style="color: #008000;">.</span><span style="color: #0000FF;">TextEventArgs</span> e<span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span>e<span style="color: #008000;">.</span><span style="color: #0000FF;">Text</span> <span style="color: #008000;">+</span> e<span style="color: #008000;">.</span><span style="color: #0000FF;">State</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#125;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> M_xmppClient_OnMessage<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, MessageEventArgs e<span style="color: #008000;">&#41;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span>e<span style="color: #008000;">.</span><span style="color: #0000FF;">Message</span><span style="color: #008000;">.</span><span style="color: #0600FF; font-weight: bold;">Value</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span>e<span style="color: #008000;">.</span><span style="color: #0000FF;">Message</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Body</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #008000;">&#125;</span></div></li>
</ol></div></div>Any help with code implementation. Thank you
]]></description>
            <author> no_email@example.com (uzair2299)</author>
            <pubDate>Fri, 12 Nov 2021 06:21:52 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2181#11084</guid>
        </item>
        <item>
            <title>Re: Dictionary key problem on reconnect</title>
            <link>https://forum.ag-software.net/thread/2180-Dictionary-key-problem-on-reconnect</link>
            <description><![CDATA[
I was assuming that the new connection gets a new instance of this handler, and therefore a new dictionary.<br />
If this is not the case then we may need to clear the dictionary on reconnect.
]]></description>
            <author> no_email@example.com (Alex)</author>
            <pubDate>Tue, 02 Nov 2021 13:51:50 GMT</pubDate>
            <guid isPermaLink="false">https://forum.ag-software.net/2180#11083</guid>
        </item>
    </channel>
</rss>
