public Socket getSocketForUser(String username) {
        synchronized (connections) {
            if (connections.containsKey(username)) {
                return connections.get(username);
            } else {
                return null;
            }
        }

    }