Example #1
0
        public static SignedSurveyRequestMessage Decode(XdrDataInputStream stream)
        {
            SignedSurveyRequestMessage decodedSignedSurveyRequestMessage = new SignedSurveyRequestMessage();

            decodedSignedSurveyRequestMessage.RequestSignature = Signature.Decode(stream);
            decodedSignedSurveyRequestMessage.Request          = SurveyRequestMessage.Decode(stream);
            return(decodedSignedSurveyRequestMessage);
        }
Example #2
0
 public static void Encode(XdrDataOutputStream stream, SurveyRequestMessage encodedSurveyRequestMessage)
 {
     NodeID.Encode(stream, encodedSurveyRequestMessage.SurveyorPeerID);
     NodeID.Encode(stream, encodedSurveyRequestMessage.SurveyedPeerID);
     Uint32.Encode(stream, encodedSurveyRequestMessage.LedgerNum);
     Curve25519Public.Encode(stream, encodedSurveyRequestMessage.EncryptionKey);
     SurveyMessageCommandType.Encode(stream, encodedSurveyRequestMessage.CommandType);
 }
Example #3
0
        public static SurveyRequestMessage Decode(XdrDataInputStream stream)
        {
            SurveyRequestMessage decodedSurveyRequestMessage = new SurveyRequestMessage();

            decodedSurveyRequestMessage.SurveyorPeerID = NodeID.Decode(stream);
            decodedSurveyRequestMessage.SurveyedPeerID = NodeID.Decode(stream);
            decodedSurveyRequestMessage.LedgerNum      = Uint32.Decode(stream);
            decodedSurveyRequestMessage.EncryptionKey  = Curve25519Public.Decode(stream);
            decodedSurveyRequestMessage.CommandType    = SurveyMessageCommandType.Decode(stream);
            return(decodedSurveyRequestMessage);
        }
Example #4
0
 public static void Encode(XdrDataOutputStream stream,
                           SignedSurveyRequestMessage encodedSignedSurveyRequestMessage)
 {
     Signature.Encode(stream, encodedSignedSurveyRequestMessage.RequestSignature);
     SurveyRequestMessage.Encode(stream, encodedSignedSurveyRequestMessage.Request);
 }