diff options
-rw-r--r-- | src/Server/ChatServer.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Server/ChatServer.java b/src/Server/ChatServer.java index fb51502..9e94794 100644 --- a/src/Server/ChatServer.java +++ b/src/Server/ChatServer.java @@ -1,14 +1,18 @@ package Server;
import java.net.*;
import java.io.*;
+import java.util.LinkedList;
public class ChatServer
{
private ServerSocket service;
+ private LinkedList<Connection> connections;
+
public static final int portNum = 6667;
ChatServer() throws IOException {
this.service = new ServerSocket(portNum);
+ this.connections = new LinkedList<Connection>();
}
public static void main(String[] args) throws IOException
@@ -30,6 +34,7 @@ public class ChatServer {
soc = server.service.accept();
Connection con = new Connection(soc);
+ server.connections.add(con);
con.start();
}
} catch (IOException e)
|