diff --git a/JChatServerV2/bin/pad/prac2/JChat$1.class b/JChatServerV2/bin/pad/prac2/JChat$1.class index d203d50..e8fef6f 100644 --- a/JChatServerV2/bin/pad/prac2/JChat$1.class +++ b/JChatServerV2/bin/pad/prac2/JChat$1.class diff --git a/JChatServerV2/bin/pad/prac2/JChat.class b/JChatServerV2/bin/pad/prac2/JChat.class index 3f22a28..5c8923a 100644 --- a/JChatServerV2/bin/pad/prac2/JChat.class +++ b/JChatServerV2/bin/pad/prac2/JChat.class diff --git a/JChatServerV2/src/pad/prac2/JChat.java b/JChatServerV2/src/pad/prac2/JChat.java index 02d7663..a906273 100644 --- a/JChatServerV2/src/pad/prac2/JChat.java +++ b/JChatServerV2/src/pad/prac2/JChat.java @@ -8,19 +8,14 @@ public class JChat { String ip; int port, roomSize; - /*Scanner in = new Scanner(System.in); + Scanner in = new Scanner(System.in); System.out.print("IP: "); ip = in.nextLine(); System.out.print("Port: "); port = in.nextInt(); System.out.print("Size of chatroom: "); roomSize = in.nextInt(); - in.close();*/ - - ip = "localhost"; - port = 3001; - roomSize = 5; - + in.close(); final Server serv = new Server(ip,port,roomSize); Runtime.getRuntime().addShutdownHook(new Thread() { diff --git a/QChatClient/chatroom.cpp b/QChatClient/chatroom.cpp index 9895005..85e802c 100644 --- a/QChatClient/chatroom.cpp +++ b/QChatClient/chatroom.cpp @@ -48,7 +48,6 @@ void sendThread(Socket* s, Chatroom* chat) { break; } - } catch(SocketException& e) { @@ -389,6 +388,7 @@ void Chatroom::startSession() Chatroom::~Chatroom() { delete msgLock; + delete chatLock; delete recv; delete send; map::iterator it;