Commit f373f4f7a0a895517d49cf4437b4233f109c388e

Authored by Imanol-Mikel Barba Sabariego
1 parent 7665c834

git-svn-id: svn://imanolbarba.net/PAD@32 c2ee353e-ed0d-4329-bf56-03aec153487f

JChatClient/bin/client
No preview for this file type
JChatClient/src/client.cpp
... ... @@ -74,6 +74,7 @@ bool connect(Socket& s)
74 74 if(response != "CHATOK")
75 75 {
76 76 cout << "Error: " << response << endl;
  77 + s.Close();
77 78 return false;
78 79 }
79 80 }
... ...
JChatServer/bin/pad/prac2/JChat$1.class
No preview for this file type
JChatServer/bin/pad/prac2/JChat.class
No preview for this file type
JChatServer/src/pad/prac2/JChat.java
... ... @@ -17,9 +17,6 @@ public class JChat
17 17 System.out.print("Size of chatroom: ");
18 18 roomSize = in.nextInt();
19 19 in.close();
20   - ip = "localhost";
21   - port = 3001;
22   - roomSize = 2;
23 20 final Server serv = new Server(ip,port,roomSize);
24 21 Runtime.getRuntime().addShutdownHook(new Thread()
25 22 {
... ... @@ -31,10 +28,4 @@ public class JChat
31 28 });
32 29 serv.startServer();
33 30 }
34   - /*
35   - * TODO
36   - *
37   - * room is full
38   - * CTRL+C
39   - */
40 31 }
... ...