public synchronized FishPacket search(Client c, String parameter) {
        this.KeywordToSearch = parameter;
        ArrayList<Map.Entry<FishFile, Client>> results = new ArrayList<>();
        ArrayList<String> word = new ArrayList<>();
        ArrayList<Integer> tmp = new ArrayList<>();
        StringTokenizer st = new StringTokenizer(parameter);
        while (st.hasMoreTokens()) {
            word.add(st.nextToken());
        }
        for (Map.Entry<FishFile, Client> entry : filesMap.entrySet()) {
            for (String it : word) {
                if (entry.getKey().getFilename().toLowerCase().contains(it.toLowerCase())
                        && (!entry.getValue().equals(c)) && !results.contains(entry)) {
                    results.add(entry);
                }
            }
        }
        Collections.sort(results, new SortByName());
        Header header = null;

        if (results.isEmpty()) {
            header = new Header(PacketType.FILENOTFOUND);
        } else {
            header = new Header(PacketType.FILEFOUND);
        }


        SearchResult sr = new SearchResult();


        for (Map.Entry<FishFile, Client> i : results) {
            FilenameAndAddress fr = new FilenameAndAddress(i.getKey().getFilename(), i.getValue().getNetResources().getSocket().getInetAddress().getHostAddress(), i.getValue().getListeningServerPort());
            sr.addFileResource(fr);
        }
        System.out.println("The server will send: " + sr.printSummary());
        FishPacket fp = new FishPacket(header, sr);
        return fp;

    }