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
DesiredMaxBatchLengthMemorySize?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.
DesiredMaxBatchPacketCountshort?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
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
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
Methods
SetDesiredMaxBatchLength(MemorySize?)
Allows to change DesiredMaxBatchLength.
[Pure]
public MessageBrokerClientNetworkPacketOptions SetDesiredMaxBatchLength(MemorySize? value)
Parameters
valueMemorySize?New value.
Returns
SetDesiredMaxBatchPacketCount(short?)
Allows to change DesiredMaxBatchPacketCount.
[Pure]
public MessageBrokerClientNetworkPacketOptions SetDesiredMaxBatchPacketCount(short? value)
Parameters
valueshort?New value.