diff --git a/JChatClient/bin/client b/JChatClient/bin/client index a76e8c5..bc75b7d 100755 --- a/JChatClient/bin/client +++ b/JChatClient/bin/client diff --git a/JChatClient/src/client.cpp b/JChatClient/src/client.cpp index 509e0a5..304a3ed 100644 --- a/JChatClient/src/client.cpp +++ b/JChatClient/src/client.cpp @@ -74,6 +74,7 @@ bool connect(Socket& s) if(response != "CHATOK") { cout << "Error: " << response << endl; + s.Close(); return false; } } diff --git a/JChatServer/bin/pad/prac2/JChat$1.class b/JChatServer/bin/pad/prac2/JChat$1.class index e169b54..f1f9d1c 100644 --- a/JChatServer/bin/pad/prac2/JChat$1.class +++ b/JChatServer/bin/pad/prac2/JChat$1.class diff --git a/JChatServer/bin/pad/prac2/JChat.class b/JChatServer/bin/pad/prac2/JChat.class index 0906afc..6b9e7b3 100644 --- a/JChatServer/bin/pad/prac2/JChat.class +++ b/JChatServer/bin/pad/prac2/JChat.class diff --git a/JChatServer/src/pad/prac2/JChat.java b/JChatServer/src/pad/prac2/JChat.java index cb9311a..3f3863a 100644 --- a/JChatServer/src/pad/prac2/JChat.java +++ b/JChatServer/src/pad/prac2/JChat.java @@ -17,9 +17,6 @@ public class JChat System.out.print("Size of chatroom: "); roomSize = in.nextInt(); in.close(); - ip = "localhost"; - port = 3001; - roomSize = 2; final Server serv = new Server(ip,port,roomSize); Runtime.getRuntime().addShutdownHook(new Thread() { @@ -31,10 +28,4 @@ public class JChat }); serv.startServer(); } - /* - * TODO - * - * room is full - * CTRL+C - */ }