-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I've implemented a Peer class that wraps the address of a peer node and a
dictionary of keys called 'metrics'. The class also contains a number of
useful helper methods. This class can/will be used when we start having
selection strategies or whatever system we finally agree on. One can a
metric to the Peer class, and use the addMetric or mulMetric to update it.
I envision the peer creation to go something like this:
Peer p=new Peer(address);
p.setMetric("reliability", 1.0);
p.setMetric("packets sent", 0);
p.setMetric("failed connects", 0);
.. etc
And later in the code:
if (failedConnect) {
p.mulMetric_double("reliability", 0.5);
p.addMetric_double("failed connects", 1);
}
These are all just silly examples of course.
Scott
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE4/NvUpXyM95IyRhURAp+FAKDQ3RTR/5GZto0oUfjPSCvNPTFLRwCgvOvK
mD+iqivUmK3zK1UjgL/5Jpw=
=F1NC
-----END PGP SIGNATURE-----
_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev