Phase test TCP envoi OK historique KO
This commit is contained in:
parent
124735fcc9
commit
616067cd20
4 changed files with 12 additions and 3 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -24,9 +24,18 @@ public class TCPEchange {
|
|||
System.out.println("Demmarrage d'une session de clavardage");
|
||||
Socket s = new Socket(User2.getIp(),5000);
|
||||
System.out.println("Socket de demarrage d'une session cree");
|
||||
ExecutorService exec = Executors.newFixedThreadPool(1000);
|
||||
exec.submit(new RunnerTCPEcoute(s,app));
|
||||
exec.submit(new RunnerTCPEnvoi(s,app,User2,false));
|
||||
//ExecutorService exec = Executors.newFixedThreadPool(1000);
|
||||
Thread t1 = new Thread(new RunnerTCPEcoute(s,app));
|
||||
Thread t2 = new Thread(new RunnerTCPEnvoi(s,app,User2,false));
|
||||
t1.start();
|
||||
t2.start();
|
||||
try {
|
||||
t1.join();
|
||||
t2.join();
|
||||
}catch(InterruptedException e) {
|
||||
System.out.println("Un thread s'est arrete brusquement");
|
||||
}
|
||||
System.out.println("Tout s'est passé crème");
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue