Commit 9db8b86d6a6908695883a619037c316ee187d3c2
1 parent
0cad7d03
git-svn-id: svn://imanolbarba.net/PAD@46 c2ee353e-ed0d-4329-bf56-03aec153487f
Showing
3 changed files
with
2 additions
and
7 deletions
JChatServerV2/bin/pad/prac2/JChat$1.class
No preview for this file type
JChatServerV2/bin/pad/prac2/JChat.class
No preview for this file type
JChatServerV2/src/pad/prac2/JChat.java
@@ -8,19 +8,14 @@ public class JChat | @@ -8,19 +8,14 @@ public class JChat | ||
8 | { | 8 | { |
9 | String ip; | 9 | String ip; |
10 | int port, roomSize; | 10 | int port, roomSize; |
11 | - /*Scanner in = new Scanner(System.in); | 11 | + Scanner in = new Scanner(System.in); |
12 | System.out.print("IP: "); | 12 | System.out.print("IP: "); |
13 | ip = in.nextLine(); | 13 | ip = in.nextLine(); |
14 | System.out.print("Port: "); | 14 | System.out.print("Port: "); |
15 | port = in.nextInt(); | 15 | port = in.nextInt(); |
16 | System.out.print("Size of chatroom: "); | 16 | System.out.print("Size of chatroom: "); |
17 | roomSize = in.nextInt(); | 17 | roomSize = in.nextInt(); |
18 | - in.close();*/ | ||
19 | - | ||
20 | - ip = "localhost"; | ||
21 | - port = 3001; | ||
22 | - roomSize = 5; | ||
23 | - | 18 | + in.close(); |
24 | final Server serv = new Server(ip,port,roomSize); | 19 | final Server serv = new Server(ip,port,roomSize); |
25 | Runtime.getRuntime().addShutdownHook(new Thread() | 20 | Runtime.getRuntime().addShutdownHook(new Thread() |
26 | { | 21 | { |