Table of Contents

Struct MessageBrokerClientNetworkPacketOptions

Namespace
LfrlAnvil.MessageBroker.Client
Assembly
LfrlAnvil.MessageBroker.Client.dll

Represents available network packet options during MessageBrokerClient creation.

public readonly record struct MessageBrokerClientNetworkPacketOptions : IEquatable<MessageBrokerClientNetworkPacketOptions>
Implements
Inherited Members

Constructors

MessageBrokerClientNetworkPacketOptions(MemorySize?, short?)

Represents available network packet options during MessageBrokerClient creation.

public MessageBrokerClientNetworkPacketOptions(MemorySize? DesiredMaxBatchLength, short? DesiredMaxBatchPacketCount)

Parameters

DesiredMaxBatchLength MemorySize?

Desired max network batch packet length. Equal to 2 MB by default. Value will be clamped to [16 KB, 1 GB] range. Actual length will be negotiated with the server during handshake. Represents max possible length for packets of Batch type.

DesiredMaxBatchPacketCount short?

Desired max number of packets in a single network batch packet. Equal to 30 by default. Value will be clamped to [0, 32767] range. Value equal to 1 will be changed to 0. Actual count will be negotiated with the server during handshake.

Properties

Default

Represents default options.

public static MessageBrokerClientNetworkPacketOptions Default { get; }

Property Value

MessageBrokerClientNetworkPacketOptions

DesiredMaxBatchLength

Desired max network batch packet length. Equal to 2 MB by default. Value will be clamped to [16 KB, 1 GB] range. Actual length will be negotiated with the server during handshake. Represents max possible length for packets of Batch type.

public MemorySize? DesiredMaxBatchLength { get; init; }

Property Value

MemorySize?

DesiredMaxBatchPacketCount

Desired max number of packets in a single network batch packet. Equal to 30 by default. Value will be clamped to [0, 32767] range. Value equal to 1 will be changed to 0. Actual count will be negotiated with the server during handshake.

public short? DesiredMaxBatchPacketCount { get; init; }

Property Value

short?

Methods

SetDesiredMaxBatchLength(MemorySize?)

Allows to change DesiredMaxBatchLength.

[Pure]
public MessageBrokerClientNetworkPacketOptions SetDesiredMaxBatchLength(MemorySize? value)

Parameters

value MemorySize?

New value.

Returns

MessageBrokerClientNetworkPacketOptions

New MessageBrokerClientNetworkPacketOptions instance.

SetDesiredMaxBatchPacketCount(short?)

Allows to change DesiredMaxBatchPacketCount.

[Pure]
public MessageBrokerClientNetworkPacketOptions SetDesiredMaxBatchPacketCount(short? value)

Parameters

value short?

New value.

Returns

MessageBrokerClientNetworkPacketOptions

New MessageBrokerClientNetworkPacketOptions instance.