Phase de test TCP - envoi OK - historique KO

This commit is contained in:
Nabil Moukhlis 2020-12-08 18:49:33 +01:00
parent 510e436ca9
commit 124735fcc9
3 changed files with 4 additions and 3 deletions

View file

@ -92,7 +92,7 @@ class RunnerTCPEnvoi implements Runnable {
this.out = new PrintWriter(link.getOutputStream());
this.in = new BufferedReader (new InputStreamReader (link.getInputStream()));
this.bonjourEnvoye = bonjour;
this.run();
//this.run();
}
@Override
public void run() {
@ -145,7 +145,6 @@ class RunnerTCPEcoute implements Runnable {
@Override
public void run() {
System.out.println("Creation d'un thread d'ecoute");
ExecutorService exec = Executors.newFixedThreadPool(1);
try {
PrintStream output = new PrintStream(link.getOutputStream());
//InputStream is = link.getInputStream();
@ -190,7 +189,9 @@ class RunnerTCPEcoute implements Runnable {
System.out.println("Bonjour recu!");
//System.out.println(src.split(":")[1].replaceAll("\n", ""));
u2=Utilisateur.stringToUtilisateur(src.split(":")[1].replaceAll("\n", ""));
exec.submit(new RunnerTCPEnvoi(link,app,u2,true));
Thread t = new Thread(new RunnerTCPEnvoi(link,app,u2,true));
t.start();
System.out.println("Thread d'envoi envoye");
}
type = line+"\n";