Author: toad
Date: 2007-10-25 16:25:21 +0000 (Thu, 25 Oct 2007)
New Revision: 15559

Modified:
   trunk/freenet/src/freenet/io/comm/DMT.java
Log:
add static constructor functions for the two new path folding messages

Modified: trunk/freenet/src/freenet/io/comm/DMT.java
===================================================================
--- trunk/freenet/src/freenet/io/comm/DMT.java  2007-10-25 16:22:21 UTC (rev 
15558)
+++ trunk/freenet/src/freenet/io/comm/DMT.java  2007-10-25 16:25:21 UTC (rev 
15559)
@@ -774,6 +774,15 @@
                addField(PADDED_LENGTH, Integer.class); // Size of actual 
transfer i.e. padded length
        }};

+       public static Message createFNPOpennetConnectDestinationNew(long uid, 
long transferUID, int noderefLength, int paddedLength) {
+               Message msg = new Message(FNPOpennetConnectDestinationNew);
+               msg.set(UID, uid);
+               msg.set(TRANSFER_UID, transferUID);
+               msg.set(NODEREF_LENGTH, noderefLength);
+               msg.set(PADDED_LENGTH, paddedLength);
+               return msg;
+       }
+       
        /** Path folding response. Sent when the requestor wants to path fold 
and has received a noderef 
         * from the data source. Starts a bulk data transfer including the 
(padded) noderef. 
         */
@@ -784,6 +793,15 @@
                addField(PADDED_LENGTH, Integer.class); // Size of actual 
transfer i.e. padded length
        }};

+       public static Message createFNPOpennetConnectReplyNew(long uid, long 
transferUID, int noderefLength, int paddedLength) {
+               Message msg = new Message(FNPOpennetConnectReplyNew);
+               msg.set(UID, uid);
+               msg.set(TRANSFER_UID, transferUID);
+               msg.set(NODEREF_LENGTH, noderefLength);
+               msg.set(PADDED_LENGTH, paddedLength);
+               return msg;
+       }
+       
        // Key offers (ULPRs)

        public static MessageType FNPOfferKey = new MessageType("FNPOfferKey") 
{{


Reply via email to