コード例 #1
0
 private void InitSaslHandler()
 {
     if (m_SaslHandler == null)
     {
         m_SaslHandler = new SaslHandler(this);
         m_SaslHandler.OnSaslStart += new SaslEventHandler(m_SaslHandler_OnSaslStart);
         m_SaslHandler.OnSaslEnd += new ObjectHandler(m_SaslHandler_OnSaslEnd);
     }
 }
コード例 #2
0
        /// <summary>
        /// Does the Clieanup of the Session and sends the OnClose Event
        /// </summary>
        private void CleanupSession()
        {
            m_CleanUpDone = true;

            // TODO, check if this is always OK
            if (ClientSocket.Connected)
                ClientSocket.Disconnect();

            DoChangeXmppConnectionState(XmppConnectionState.Disconnected);

            StreamParser.Reset();

            m_IqGrabber.Clear();
            m_MessageGrabber.Clear();

            if (m_SaslHandler != null)
            {
                m_SaslHandler.Dispose();
                m_SaslHandler = null;
            }

            m_Authenticated		= false;
            m_Binded			= false;

            DestroyKeepAliveTimer();

            if (OnClose!=null)
                OnClose(this);
        }