-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> 
> I thought about this, and I came to the following conclusion about how I would
> do it.
> 
> The Freenet core should have an field that contains an object of the interface
> Protocol. The Protocol interface should contain something like the following
> methods (at least) :
> 
> /**
> * Performs a key exchange or other initalization of a new connection
> * @param c   The Connection to initialize
> * @return      An object with information about this connection
> **/
> public ConnectionInfo initialize(Connection c);
Good.

> /**
> * Creates a new RawMessage of an inputstream by reading this protocol. This
> * method locks until an entire message has been read (excluding trailing)
> * @param i    The InputStream to read
> * @param ci  An object containing information about the connection
> * @return      A new RawMessage
> **/
> public RawMessage newMessage(InputStream i, ConnectionInfo ci) throws
> IOException;

I'd call this readMessage, or readRawMessage but I agree.

> /**
> * Creates a new RawMessage of a given type that uses this protocol
> * @param s    The name of the message type
> * @param ci   An object containing information about the connection
> **/
> public RawMessage newMessage(String s, ConnectionInfo ci);
Why the String argument.  Could we not just pass a Class?


 Scott

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE5EIP1pXyM95IyRhURAvSRAJ43vcwoX2Q0JoN8a+xSrmFM0BG/FQCgsDl2
FkOhfBIMbYkQQVujF5KW4Vs=
=bc3q
-----END PGP SIGNATURE-----


_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to