Struct MessageBrokerServerNetworkPacketOptions
- Namespace
- LfrlAnvil.MessageBroker.Server
- Assembly
- LfrlAnvil.MessageBroker.Server.dll
Represents available network packet options during MessageBrokerServer creation.
public readonly record struct MessageBrokerServerNetworkPacketOptions : IEquatable<MessageBrokerServerNetworkPacketOptions>
- Implements
- Inherited Members
Constructors
MessageBrokerServerNetworkPacketOptions(MemorySize?, MemorySize?, MemorySize?, short?)
Represents available network packet options during MessageBrokerServer creation.
public MessageBrokerServerNetworkPacketOptions(MemorySize? MaxLength, MemorySize? MaxMessageLength, MemorySize? MaxBatchLength, short? MaxBatchPacketCount)
Parameters
MaxLengthMemorySize?Max network packet length and min segment length for each client's underlying memory pool. Equal to 16 KB by default. Value will be clamped to [16 KB, 1 MB] range. Represents max possible length for packets not handled by either MaxMessageLength or MaxBatchLength.
MaxMessageLengthMemorySize?Max network message packet length. Equal to 10 MB by default. Value will be clamped to [MaxLength, 1 GB] range. Represents max possible length for outbound packets of MessageNotification type or inbound packets of PushMessage type.
MaxBatchLengthMemorySize?Max network batch packet length. Equal to 10 MB by default. Value will be clamped to [MaxLength, 1 GB] range. Represents max possible length for packets of Batch type.
MaxBatchPacketCountshort?Max number of packets in a single network batch packet. Equal to 100 by default. Value will be clamped to [0, 32767] range. Value equal to 1 will be changed to 0.
Properties
Default
Represents default options.
public static MessageBrokerServerNetworkPacketOptions Default { get; }
Property Value
MaxBatchLength
Max network batch packet length. Equal to 10 MB by default. Value will be clamped to [MaxLength, 1 GB] range. Represents max possible length for packets of Batch type.
public MemorySize? MaxBatchLength { get; init; }
Property Value
MaxBatchPacketCount
Max number of packets in a single network batch packet. Equal to 100 by default. Value will be clamped to [0, 32767] range. Value equal to 1 will be changed to 0.
public short? MaxBatchPacketCount { get; init; }
Property Value
MaxLength
Max network packet length and min segment length for each client's underlying memory pool. Equal to 16 KB by default. Value will be clamped to [16 KB, 1 MB] range. Represents max possible length for packets not handled by either MaxMessageLength or MaxBatchLength.
public MemorySize? MaxLength { get; init; }
Property Value
MaxMessageLength
Max network message packet length. Equal to 10 MB by default. Value will be clamped to [MaxLength, 1 GB] range. Represents max possible length for outbound packets of MessageNotification type or inbound packets of PushMessage type.
public MemorySize? MaxMessageLength { get; init; }
Property Value
Methods
SetMaxBatchLength(MemorySize?)
Allows to change MaxBatchLength.
[Pure]
public MessageBrokerServerNetworkPacketOptions SetMaxBatchLength(MemorySize? value)
Parameters
valueMemorySize?New value.
Returns
SetMaxBatchPacketCount(short?)
Allows to change MaxBatchPacketCount.
[Pure]
public MessageBrokerServerNetworkPacketOptions SetMaxBatchPacketCount(short? value)
Parameters
valueshort?New value.
Returns
SetMaxLength(MemorySize?)
Allows to change MaxLength.
[Pure]
public MessageBrokerServerNetworkPacketOptions SetMaxLength(MemorySize? value)
Parameters
valueMemorySize?New value.
Returns
SetMaxMessageLength(MemorySize?)
Allows to change MaxMessageLength.
[Pure]
public MessageBrokerServerNetworkPacketOptions SetMaxMessageLength(MemorySize? value)
Parameters
valueMemorySize?New value.