Skip to content

Commit

Permalink
OK
Browse files Browse the repository at this point in the history
  • Loading branch information
ElyesKhama committed Dec 22, 2017
1 parent 4402438 commit f85df68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
13 changes: 0 additions & 13 deletions src/SourcePackage/SetThreadCommunication.java

This file was deleted.

9 changes: 5 additions & 4 deletions src/SourcePackage/ThreadAcceptTCP.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@

public class ThreadAcceptTCP extends Thread{

private HashMap<Socket, SetThreadCommunication> listThreadToSocket;
private ThreadReceiveTCPFinal threadReceiveTCP;

private ServerSocket client1Socket ;


public ThreadAcceptTCP(String name) {
super(name);
listThreadToSocket = new HashMap<>();
try {
client1Socket = new ServerSocket(Main.user.getPort());
} catch (IOException ex) {
Expand All @@ -37,7 +36,9 @@ public void run() {
System.out.println("port : " + client2Socket.getPort());

Main.user.putListSocket(client2Socket); // dans l'hash map des socket on va rajouter un socket du client qui se connecte
listThreadToSocket.put(client2Socket, new SetThreadCommunication(client2Socket)); //liste des threads

threadReceiveTCP = new ThreadReceiveTCPFinal(client2Socket);
threadReceiveTCP.start();
}
}
} catch (IOException e) {
Expand Down

0 comments on commit f85df68

Please sign in to comment.