Refactor to help further graphics
This commit is contained in:
15
ChatApp/src/ChatAppClient.java
Normal file
15
ChatApp/src/ChatAppClient.java
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import client.ClientConsole;
|
||||||
|
|
||||||
|
import java.net.InetSocketAddress;
|
||||||
|
|
||||||
|
public class ChatAppClient {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
ClientConsole console = new ClientConsole(new InetSocketAddress("localhost", 6665));
|
||||||
|
try {
|
||||||
|
console.joinThread();
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
System.out.println("End !");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -23,17 +23,6 @@ public class Client {
|
|||||||
login(pseudo);
|
login(pseudo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ClientConsole console = new ClientConsole(new InetSocketAddress("localhost", 6665));
|
|
||||||
try {
|
|
||||||
console.joinThread();
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
System.out.println("End !");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void close() {
|
public void close() {
|
||||||
this.connexion.sendPacket(new DisconnectPacket("Leaving"));
|
this.connexion.sendPacket(new DisconnectPacket("Leaving"));
|
||||||
this.connexion.close();
|
this.connexion.close();
|
||||||
|
|||||||
Reference in New Issue
Block a user