Phase de test TCP - envoi OK - historique KO
This commit is contained in:
parent
510e436ca9
commit
124735fcc9
3 changed files with 4 additions and 3 deletions
Binary file not shown.
Binary file not shown.
|
@ -92,7 +92,7 @@ class RunnerTCPEnvoi implements Runnable {
|
||||||
this.out = new PrintWriter(link.getOutputStream());
|
this.out = new PrintWriter(link.getOutputStream());
|
||||||
this.in = new BufferedReader (new InputStreamReader (link.getInputStream()));
|
this.in = new BufferedReader (new InputStreamReader (link.getInputStream()));
|
||||||
this.bonjourEnvoye = bonjour;
|
this.bonjourEnvoye = bonjour;
|
||||||
this.run();
|
//this.run();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -145,7 +145,6 @@ class RunnerTCPEcoute implements Runnable {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
System.out.println("Creation d'un thread d'ecoute");
|
System.out.println("Creation d'un thread d'ecoute");
|
||||||
ExecutorService exec = Executors.newFixedThreadPool(1);
|
|
||||||
try {
|
try {
|
||||||
PrintStream output = new PrintStream(link.getOutputStream());
|
PrintStream output = new PrintStream(link.getOutputStream());
|
||||||
//InputStream is = link.getInputStream();
|
//InputStream is = link.getInputStream();
|
||||||
|
@ -190,7 +189,9 @@ class RunnerTCPEcoute implements Runnable {
|
||||||
System.out.println("Bonjour recu!");
|
System.out.println("Bonjour recu!");
|
||||||
//System.out.println(src.split(":")[1].replaceAll("\n", ""));
|
//System.out.println(src.split(":")[1].replaceAll("\n", ""));
|
||||||
u2=Utilisateur.stringToUtilisateur(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");
|
System.out.println("Thread d'envoi envoye");
|
||||||
}
|
}
|
||||||
type = line+"\n";
|
type = line+"\n";
|
||||||
|
|
Loading…
Reference in a new issue