From f373f4f7a0a895517d49cf4437b4233f109c388e Mon Sep 17 00:00:00 2001 From: Imanol-Mikel Barba Sabariego Date: Tue, 10 Dec 2013 03:36:44 +0000 Subject: [PATCH] git-svn-id: svn://imanolbarba.net/PAD@32 c2ee353e-ed0d-4329-bf56-03aec153487f --- JChatClient/bin/client | Bin 23256 -> 0 bytes JChatClient/src/client.cpp | 1 + JChatServer/bin/pad/prac2/JChat$1.class | Bin 774 -> 0 bytes JChatServer/bin/pad/prac2/JChat.class | Bin 1351 -> 0 bytes JChatServer/src/pad/prac2/JChat.java | 9 --------- 5 files changed, 1 insertion(+), 9 deletions(-) diff --git a/JChatClient/bin/client b/JChatClient/bin/client index a76e8c5..bc75b7d 100755 Binary files a/JChatClient/bin/client and b/JChatClient/bin/client differ 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 Binary files a/JChatServer/bin/pad/prac2/JChat$1.class and b/JChatServer/bin/pad/prac2/JChat$1.class differ diff --git a/JChatServer/bin/pad/prac2/JChat.class b/JChatServer/bin/pad/prac2/JChat.class index 0906afc..6b9e7b3 100644 Binary files a/JChatServer/bin/pad/prac2/JChat.class and b/JChatServer/bin/pad/prac2/JChat.class differ 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 - */ } -- libgit2 0.22.2