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); }
public static SurveyResponseMessage Decode(XdrDataInputStream stream) { SurveyResponseMessage decodedSurveyResponseMessage = new SurveyResponseMessage(); decodedSurveyResponseMessage.SurveyorPeerID = NodeID.Decode(stream); decodedSurveyResponseMessage.SurveyedPeerID = NodeID.Decode(stream); decodedSurveyResponseMessage.LedgerNum = Uint32.Decode(stream); decodedSurveyResponseMessage.CommandType = SurveyMessageCommandType.Decode(stream); decodedSurveyResponseMessage.EncryptedBody = EncryptedBody.Decode(stream); return(decodedSurveyResponseMessage); }
public static SurveyResponseBody Decode(XdrDataInputStream stream) { SurveyResponseBody decodedSurveyResponseBody = new SurveyResponseBody(); SurveyMessageCommandType discriminant = SurveyMessageCommandType.Decode(stream); decodedSurveyResponseBody.Discriminant = discriminant; switch (decodedSurveyResponseBody.Discriminant.InnerValue) { case SurveyMessageCommandType.SurveyMessageCommandTypeEnum.SURVEY_TOPOLOGY: decodedSurveyResponseBody.TopologyResponseBody = TopologyResponseBody.Decode(stream); break; } return(decodedSurveyResponseBody); }