initial commit

This commit is contained in:
MAUREL Yoann
2019-01-21 13:19:32 +01:00
commit e8af3e14b3
9 changed files with 375 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
package fr.istic.pr.echo;
public interface ClientHandler {
/** La méthode handle traite le client **/
public void handle();
}

View File

@@ -0,0 +1,18 @@
package fr.istic.pr.echo;
import java.net.Socket;
public class ClientHandlerBytes implements ClientHandler {
private Socket socket;
public ClientHandlerBytes(Socket socket){
this.socket = socket;
}
public void handle() {
//Lecture du message dans un buffer de bytes
//Envoie du buffer de bytes.
}
}

View File

@@ -0,0 +1,15 @@
package fr.istic.pr.echo;
public class EchoServer {
public static void main(String[] args) {
//Attente sur le port 8080
/* Pour chaque client :
1. accepter la connexion.
2. créer un ClientHandler
3. appeler la méthode handleBytes() sur le handler
*/
}
}

View File

@@ -0,0 +1,6 @@
package fr.istic.pr.echomt;
public interface ClientHandler {
/** La méthode handle traite le client **/
public void handle();
}

View File

@@ -0,0 +1,6 @@
package fr.istic.pr.serveur;
public interface ClientHandler {
/** La méthode handle traite le client **/
public void handle();
}