 		private function dataHandler( event : DataEvent ) : void
 		{
 			var data : String = event.data;
-			
-			// If we received an acknowledgement finish-up.			
-			if ( data == END_OF_TEST_ACK )
-			{
+
+			// If we received an acknowledgement on startup, the java server is read and we can start sending.			
+			if ( data == START_OF_TEST_RUN_ACK ) {
+				setStatusReady();
+			} else if ( data == END_OF_TEST_ACK ) {
+				// If we received an acknowledgement finish-up.
 				exit();
 			}
 		}

		
		private function handleConnect(event:Event):void
		{
			_ready = true;
			dispatchEvent( new Event( AsyncListenerWatcher.LISTENER_READY ) );
		}

		private function errorHandler(event:Event):void

		
		private static const END_OF_TEST_ACK : String ="<endOfTestRunAck/>";
		private static const END_OF_TEST_RUN : String = "<endOfTestRun/>";
		private static const START_OF_TEST_RUN_ACK : String = "<startOfTestRunAck/>";
		
		private var socket:XMLSocket;
		
