It is no secret that many cities have their own local area networks. Exchange in these networks most often occurs on the principle of
DirectConnect and through the programs DC ++, StrongDC ++, FlyLinkDC ++, etc.
File search in these programs occurs in real time, i.e. only those users who are currently connected to the hub. So this search is not complete. Plus, the programs do not show which new files appeared on the network since my last visit to the hub. And this is a real problem - it is constantly necessary to run a search for “avi, mdf, pdf” requests, etc. to see what new movies, games, books have appeared ... In general, a headache :).
Under the cut, I offer a simple solution to these problems (so to speak, fast and head to head :)
Consider the principle of operation of one of the programs: FlyLinkDC ++
To see what files a particular user has, we download his
File List . This list is nothing more than the usual
XML in the
bz2 format
archive and copies this happiness into the “C: \ Program Files \ FlylinkDC ++ \ Settings \ FileLists \” folder (provided that the program was installed with default settings). Accordingly, receiving lists of files from all users, they all appear in the “FileLists” folder.
')
And then the matter of technology:
1. Unpack the files
2. Parsing XML into the database (the TTH field must be unique).
3. We use.
Because one field in the database is unique (the TTH field is the hash of the file), then we avoid duplicate files in the database.
Knowing the time to add data to our database - it is easy to track the appearance of new files on the network.
The file list is always available, even if a particular user is disconnected from the hub.
With my own clumsy hands, a
program was written (archive 4 Mb. Source code + exe) that implements these actions. Everything is done quickly. Visual Basic .Net was used and SQLite was used as the base.
Appearance:

Now there is no time to finish the program, so bringing it to mind is welcome!
And do not forget to share the refinement:!)