waldheinz / h-fcp Goto Github PK
View Code? Open in Web Editor NEWHaskell Implementation of the Freenet Client Protocol (FCP)
License: GNU Lesser General Public License v3.0
Haskell Implementation of the Freenet Client Protocol (FCP)
License: GNU Lesser General Public License v3.0
Someone gave a detailed description at FMS:
Each time you insert a new edition, you insert 4 datehint files. Or less
than 4 if some of the filenames are already used by previous datehints.
To simplify your work, you may always insert all 4 of them and just
ignore collision errors, like Freenet itself does.
A datehint is a small text file. It contains 3 lines, each one is
terminated by '\n'. First line is "HINT", without quotes. Second line is
a number of the edition inserted toghether with the datehint. Third
line is the full date (<year>-<month>-<day>, see below) of the
insertion.
Filenames of daily hints look as follows:
SSK@<key>/<docname>-DATEHINT-<year>-<month>-<day>
<year>-<month>-<day> is the date of the insertion. <year> is 4-digit
number. <month> is a zero-based, non-padded numerical month id. <day> is
an 1-based day of month. For example, Jan 1, 2014 is 2014-0-1. Timezone
is UTC.
Filenames of monthly and yearly hints are just shortened daily ones:
SSK@<key>/<docname>-DATEHINT-<year>-<month>
SSK@<key>/<docname>-DATEHINT-<year>
Filenames of wekly datehints are more complicated:
SSK@<key>/<docname>-DATEHINT-<year>-WEEK-<week>
<week> is a week-of-year number. New week starts on Sunday. Jan 1 is
week 1.
If Freenet wants to find the latest edition of a USK it knows nothing
about, it starts its search from a fairly recent edition determined by
fetching datehints for current day, current week, current month and
current year (probably it should also try previous year but looks like
it doesn't). If none of those datehints are present, it uses a negative
edition as a hint instead. Usually that means starting from edition 1.
Example:
Key:
SSK@Isel-izgllc8sr~1reXQJz1LNGLIY-voOnLWWOyagYQ,xWfr4py0YZqAQSI-BX7bolDe-kI3DW~i9xHCHd-Bu9k,AQACAAE/linkageddon-DATEHINT-2014-WEEK-2
Content:
HINT
1012
2014-0-7
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.