cleaning
This commit is contained in:
parent
71f151be8d
commit
e6a90adedd
7 changed files with 0 additions and 41 deletions
Binary file not shown.
Before Width: | Height: | Size: 139 KiB |
Binary file not shown.
Before Width: | Height: | Size: 59 KiB |
|
@ -1,7 +0,0 @@
|
||||||
COO/POO 2020
|
|
||||||
SYSTEME DE CLAVARDAGE DISTRIBUE INTERACTIF MULTI-UTILISATEUR TEMPS REEL
|
|
||||||
|
|
||||||
4IR A2
|
|
||||||
Alexandre Gonzalvez
|
|
||||||
Théau Giraud
|
|
||||||
Léonie Gallois
|
|
34
Server.java
34
Server.java
|
@ -1,34 +0,0 @@
|
||||||
package websocket;
|
|
||||||
|
|
||||||
import javax.websocket.server.*;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import javax.websocket.*;
|
|
||||||
|
|
||||||
@ServerEndpoint("/hello/")
|
|
||||||
public class Server {
|
|
||||||
private Session session;
|
|
||||||
|
|
||||||
@OnOpen
|
|
||||||
public void connect(Session session) {
|
|
||||||
this.session= session;
|
|
||||||
System.out.println("session :"+ session);
|
|
||||||
}
|
|
||||||
|
|
||||||
@OnClose
|
|
||||||
public void close() {
|
|
||||||
this.session=null;
|
|
||||||
System.out.println("session closed");
|
|
||||||
}
|
|
||||||
|
|
||||||
@OnMessage
|
|
||||||
public void onMessage(String msg) throws IOException {
|
|
||||||
System.out.println("msg recu:"+msg);
|
|
||||||
this.session.getAsyncRemote().sendText("server:"+msg);
|
|
||||||
//if (this.session != null && this.session.isOpen()) {
|
|
||||||
// this.session.getBasicRemote().sendText("server:"+msg);
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Binary file not shown.
Before Width: | Height: | Size: 60 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.3 MiB |
BIN
boite_noire.pdf
BIN
boite_noire.pdf
Binary file not shown.
Loading…
Reference in a new issue