Table of Contents

Class EnvelopeCodecLimits

Namespace
AnyProtocol.Encoder.Abstraction
Assembly
AnyProtocol.Encoder.Abstraction.dll

Defines the common resource limits enforced by envelope codecs.

public sealed record EnvelopeCodecLimits : IEquatable<EnvelopeCodecLimits>
Inheritance
EnvelopeCodecLimits
Implements
Inherited Members

Constructors

EnvelopeCodecLimits()

public EnvelopeCodecLimits()

Fields

DefaultMaxBodySize

The default maximum envelope body size.

public const int DefaultMaxBodySize = 67108864

Field Value

int

DefaultMaxDecompressedSize

The default maximum decompressed frame size.

public const int DefaultMaxDecompressedSize = 67108864

Field Value

int

DefaultMaxFrameSize

The default maximum complete frame size.

public const int DefaultMaxFrameSize = 67108864

Field Value

int

DefaultMaxHeaderBytes

The default maximum aggregate UTF-8 header bytes.

public const int DefaultMaxHeaderBytes = 1048576

Field Value

int

DefaultMaxHeaderCount

The default maximum number of headers.

public const int DefaultMaxHeaderCount = 1024

Field Value

int

Properties

Default

Gets the default limits.

public static EnvelopeCodecLimits Default { get; }

Property Value

EnvelopeCodecLimits

MaxBodySize

Gets the maximum envelope body size.

public int MaxBodySize { get; init; }

Property Value

int

MaxDecompressedSize

Gets the maximum decompressed frame size used by compression decorators.

public int MaxDecompressedSize { get; init; }

Property Value

int

MaxFrameSize

Gets the maximum complete frame size.

public int MaxFrameSize { get; init; }

Property Value

int

MaxHeaderBytes

Gets the maximum aggregate UTF-8 header bytes.

public int MaxHeaderBytes { get; init; }

Property Value

int

MaxHeaderCount

Gets the maximum number of headers.

public int MaxHeaderCount { get; init; }

Property Value

int

Methods

Equals(EnvelopeCodecLimits?)

public bool Equals(EnvelopeCodecLimits? other)

Parameters

other EnvelopeCodecLimits

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Validate()

Validates the configured limits.

public void Validate()

Operators

operator ==(EnvelopeCodecLimits?, EnvelopeCodecLimits?)

public static bool operator ==(EnvelopeCodecLimits? left, EnvelopeCodecLimits? right)

Parameters

left EnvelopeCodecLimits
right EnvelopeCodecLimits

Returns

bool

operator !=(EnvelopeCodecLimits?, EnvelopeCodecLimits?)

public static bool operator !=(EnvelopeCodecLimits? left, EnvelopeCodecLimits? right)

Parameters

left EnvelopeCodecLimits
right EnvelopeCodecLimits

Returns

bool