Implementation TCP
This commit is contained in:
parent
aecd3e2692
commit
5a20c9fd06
3 changed files with 3 additions and 1 deletions
Binary file not shown.
Binary file not shown.
|
@ -96,7 +96,7 @@ class RunnerTCPEnvoi implements Runnable {
|
|||
while(true){
|
||||
msg = sc.nextLine();
|
||||
MessageHorodate mh = new MessageHorodate(Destinataire,app.getMe(),msg,1);
|
||||
out.println(mh.toString());
|
||||
out.println(msg);
|
||||
out.flush();
|
||||
}
|
||||
}
|
||||
|
@ -123,8 +123,10 @@ class RunnerTCPEcoute implements Runnable {
|
|||
String line = in.readLine();
|
||||
String msg = "";
|
||||
while (line != null) {
|
||||
|
||||
//if(!msg.equals("")) {
|
||||
System.out.println("Received: "+ line);
|
||||
line = in.readLine();
|
||||
//}
|
||||
/*if((line.split(" ")[0].equals("Destinataire"))) {
|
||||
if(msg != "") {
|
||||
|
|
Loading…
Reference in a new issue