 		
 		public function XMPPConnection()
 		{	
-			// Create the socket
-			socket = new XMLSocket();
-			socket.addEventListener(Event.CONNECT,socketConnected);
-			socket.addEventListener(IOErrorEvent.IO_ERROR,onIOError);
-			socket.addEventListener(Event.CLOSE,socketClosed);
-			socket.addEventListener(DataEvent.DATA,socketReceivedData);
-			socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR,securityError);
 			
 			// Hash to hold callbacks for IQs
 			pendingIQs = new Object();

		{
			ignoreWhitespace = val;
		}
	}
}

		 */
		public function connect( streamType:String = "terminatedStandard" ):Boolean
		{
			
			// Create the socket
			_socket = _createXmlSocket(); 
			
			active = false;
			loggedIn = false;
			
