agsXMPP.XmppClientConnection.CleanupSession C# (CSharp) Method

CleanupSession() private method

Does the Clieanup of the Session and sends the OnClose Event
private CleanupSession ( ) : void
return void
		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);			
		}