My proposal:
----------------------
DataReply
.
.
.
Metadata-length=125
DataLength=125
Data
----------------------
..... ENCRYPTED ....
----------------------
when decrypted:
Redirect
blah=blah
blah=blah
Data
freenet:CHK at lashdfouweatahf
---------------------------- <- NO DATA
----------------------------
The client knows that the data is special to Freenet (ie is a Redirect,
document stack, or other) and can parse it in the FNP message format
because no data is present.
Brandons proposal:
DataReply
.
.
.
Metadata-length=125
Data-length=32
---------------------
... ENCRYPTED ...
---------------------
Now, at this point, the client *has* to decrypt the metadata, parse it as
a FNP style message, and find the content-type to find out if its a
special freenet metadata section.
---------------------
<Content>Dadosoft Freenet-manager document</Content>
<Title>Bob's Document</Title>
<Author>Bob</Author>
---------------------
Hi, I'm bob, and this is my Dadosoft document!
---------------------
Oops, it wasn't Freenet style metadata, but the "Next Big Thing" (tm),
which we didn't count on. The client parser either fails because this is
apparently an XML format, or it has to catch an exception trying to parse
the metadata and then decide that it wasn't in fact freenet
special. Either way is a tremendous waste of time, since
( Metadata-length - Data-length == 0 )
takes a nanosecond on a processor.
Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20000819/0cb16d26/attachment.pgp>