This commit is contained in:
LMAGallois 2021-02-13 13:59:38 +01:00
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

View file

@ -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

View file

@ -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

Binary file not shown.