使用 agsxmpp 库关闭 XMPP 连接

  public class ConnectionManager
    { 
         private XmppClientConnection _xmppClientConnection = null;

         public ConnectionManager()
                {
                    if (_xmppClientConnection == null)
                    {
                        _xmppClientConnection = new XmppClientConnection();
                    }
                }
         public void CloseXmppConnection()
                {
                    try
                    {
                        if (_xmppClientConnection != null)
                        {
                                //Close xmpp Client Connection
                             _xmppClientConnection.Close();
                        }
                        
                      
                    }
                    catch (Exception ex)
                    {
                    }
                }
    }