public void run() {
		try {
			int servPort = 53346;
			ServerSocket servSock;
			if(localAddr == null){
				servSock = new ServerSocket(servPort);
			}else{
				servSock = new ServerSocket(servPort, 50, localAddr);
			}
			
			while(true){
				System.out.println("Waiting for client ...");
				Socket playerSocket = servSock.accept();
				System.out.println("Client: " + playerSocket.toString() + " was connected");
				
				Client newConnection = new Client(playerSocket);
				String key = "" + playerSocket.getRemoteSocketAddress();
				if(clientMap.containsKey(key) || currentRound > 0){
					//close socket if connection to the host is already established.
					//Or game is already started.
					newConnection.closeSocket(EndType.DISCONNECT);
				}else{
					clientMap.put(key, newConnection);
					newConnection.addListener(new MessageEventListener(){
						public void messageEvent(MessageObject mo) throws IOException {
							messageFromClient(mo);
						}
					});
					Thread thread = new Thread(newConnection);
					thread.start();
				}
			}
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}