Code example for CopyOnWriteArrayList

Methods: size

0
		/** 
		 * @return the number of currently connected clients 
		 */ 
		public int getClientCount() 
		{ 
			return clients.size();
		} 
		 
		/** 
		 * Starts the server. 
		 * @throws IOException 
		 */ 
		public void start() throws IOException 
		{ 
			keepAlive = true;
			serverSocket = new ServerSocket(port);
			 
			(listenThread = new Thread(){
				public void run() 
				{ 
					Socket socket;