public void transaction() throws Exception
	{
		while (true)
		{
			System.out.println("Attente du destinataire (couple IP/port)");
			rx(dataSocket, message);
			System.out.println("Configuration destinataire réussi...");
			try
			{
				while(Sequence != nbSequence)
				{
					System.out.println("Début de la transmission DATA " + Sequence + " " + nextSequence + " " +nbSequence);
					// envoie des paquets
					for (long i=Sequence;i<((Sequence+WIN>nbSequence)?nbSequence:Sequence+WIN);i++) 
					{
						if (lost == 100 || !sequenceLost(lost))
						{
							sendData(fileSequences.get((int)i), i);
						}
					}
					System.out.println("Attente des ACKs dans l'ordre' " + Sequence + " " + nextSequence);
					// reception des ack
					waitAnswer();
				}
			}
			catch (ArrayIndexOutOfBoundsException e)
			{
				// si la derniere sequence a la meme longueur que le payload
				if (fileSequences.lastElement().length == PAYLOADLENGTH) 
				{
					sendData(new byte[0], Sequence);
					waitAnswer();
				}
				reset();
			}
			reset();
		}
	}