public static void Encode(XdrDataOutputStream stream, Hello encodedHello) { Uint32.Encode(stream, encodedHello.LedgerVersion); Uint32.Encode(stream, encodedHello.OverlayVersion); Uint32.Encode(stream, encodedHello.OverlayMinVersion); Hash.Encode(stream, encodedHello.NetworkID); stream.WriteString(encodedHello.VersionStr); stream.WriteInt(encodedHello.ListeningPort); NodeID.Encode(stream, encodedHello.PeerID); AuthCert.Encode(stream, encodedHello.Cert); Uint256.Encode(stream, encodedHello.Nonce); }
public static void Encode(IByteWriter stream, Hello encodedHello) { Uint32.Encode(stream, encodedHello.LedgerVersion); Uint32.Encode(stream, encodedHello.OverlayVersion); Uint32.Encode(stream, encodedHello.OverlayMinVersion); Hash.Encode(stream, encodedHello.NetworkID); XdrEncoding.WriteString(stream, encodedHello.VersionStr); XdrEncoding.EncodeInt32(encodedHello.ListeningPort, stream); NodeID.Encode(stream, encodedHello.PeerID); AuthCert.Encode(stream, encodedHello.Cert); Uint256.Encode(stream, encodedHello.Nonce); }