Tests sur le TCP
This commit is contained in:
부모
cfca7b6f5a
커밋
dda0ef459e
6개의 변경된 파일과 12개의 추가작업 그리고 8개의 파일을 삭제
Binary file not shown.
|
@ -46,6 +46,8 @@ public class Historique {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void afficher10derniers() {
|
public void afficher10derniers() {
|
||||||
|
System.out.println("Demarrage de l'affichage partiel de l'historique");
|
||||||
|
System.out.println("Il y a actuellement " + HistoriqueHorodate.size() +" elements dans l'historique");
|
||||||
int n =10;
|
int n =10;
|
||||||
if(HistoriqueHorodate.size()<=10) {
|
if(HistoriqueHorodate.size()<=10) {
|
||||||
n = HistoriqueHorodate.size();
|
n = HistoriqueHorodate.size();
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -5,6 +5,7 @@ import java.io.OutputStream;
|
||||||
import java.net.DatagramSocket;
|
import java.net.DatagramSocket;
|
||||||
import java.net.ServerSocket;
|
import java.net.ServerSocket;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
|
import java.net.SocketException;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
|
@ -159,7 +160,6 @@ class RunnerTCPEcoute implements Runnable {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(line.split(":")[0].equals("Source")) {
|
else if(line.split(":")[0].equals("Source")) {
|
||||||
|
@ -180,14 +180,16 @@ class RunnerTCPEcoute implements Runnable {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
System.out.println("Finishing thread");
|
|
||||||
app.getHist(u2.getPseudo()).afficher10derniers();
|
|
||||||
|
|
||||||
|
|
||||||
in.close();
|
in.close();
|
||||||
link.close();
|
link.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
//e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
System.out.println("Finishing thread");
|
||||||
|
System.out.println("Affichage de l'histo");
|
||||||
|
app.getHist(u2.getPseudo()).afficher10derniers();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
불러오는 중…
Reference in a new issue