# ---------------------------------------------------------------------------------------------------------------------------------
# Network Settings
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
# ---------------------------------------------------------------------------------------------------------------------------------


# ---------------------------------------------------------------------------------------------------------------------------------
# General Network Settings
# ---------------------------------------------------------------------------------------------------------------------------------

# Shutdown Wait Time
# Defines the time in seconds the server waits for send/receive packets to be finalized during shutdown.
# Default: 5 seconds
ShutdownWaitTime = 5

# Define if packet dropping is enabled.
# Default: False
DropPackets = False

# Packet Dropping Threshold
# Defines the threshold to drop disposable packets. Higher values allow more packets to be queued
# before dropping starts, potentially reducing packet loss at the cost of higher memory usage.
# Default: 250
DropPacketThreshold = 250


# ---------------------------------------------------------------------------------------------------------------------------------
# ThreadPool Settings
# ---------------------------------------------------------------------------------------------------------------------------------

# Defines the core pool size of threads in each packet execution thread pool.
# This determines the number of threads that will be prestarted and available to handle tasks immediately.
# If set to 0 the default size is set to the number of available processor cores.
# A higher number can handle more tasks concurrently, while a lower number conserves resources.
# Default: 0 (auto-configured as the number of available processor cores * 4)
ThreadPoolSize = 4

# Defines the priority level of threads within the packet execution thread pool.
# This value determines the importance of these threads relative to other processes on the system.
# Values typically range from 1 (lowest priority) to 10 (highest priority).
# Default: 5 (medium priority level suitable for general task handling)
ThreadPriority = 5


# ---------------------------------------------------------------------------------------------------------------------------------
# Buffer Pool Settings
# ---------------------------------------------------------------------------------------------------------------------------------

# Initial factor, size, and buffer size for small, medium, and large buffer pools.
# These pools optimize memory usage by reusing common buffer sizes.

# Buffer Segment Size
# Size of segments for dynamic buffers, which are used to increase buffer sizes as needed.
# Default: 64
BufferSegmentSize = 64

# Allow the buffer pool to dynamically increase its size when it reaches maximum capacity.
# Default: True
BufferPool.AutoExpandCapacity = True

# Initial Factor
# Multiplier for pre-initializing buffer pools. A higher factor means more buffers are pre-created.
# Default: 0 (no pre-initialization)
BufferPool.InitFactor = 0

# Empty Buffer Pool
# Size and buffer size for empty size buffers. Used for empty sized network packets.
# Default: 100 buffers of 2 bytes each.
BufferPool.Empty.Size = 100
BufferPool.Empty.BufferSize = 2

# Minimum Buffer Pool
# Size and buffer size for minimum size buffers. Used for minimum sized network packets.
# Default: 100 buffers of 64 bytes each.
BufferPool.Minimum.Size = 100
BufferPool.Minimum.BufferSize = 64

# Very Small Buffer Pool
# Size and buffer size for very small buffers. Used for very small network packets.
# Default: 75 buffers of 128 bytes each.
BufferPool.VerySmall.Size = 75
BufferPool.VerySmall.BufferSize = 128

# Small Buffer Pool
# Size and buffer size for small buffers. Used for small network packets.
# Default: 75 buffers of 256 bytes each.
BufferPool.Small.Size = 75
BufferPool.Small.BufferSize = 256

# Large Small Buffer Pool
# Size and buffer size for larger small buffers. Used for larger small network packets.
# Default: 75 buffers of 512 bytes each.
BufferPool.LargeSmall.Size = 75
BufferPool.LargeSmall.BufferSize = 512

# Small Medium Buffer Pool
# Size and buffer size for small medium buffers. Used for smaller medium network packets.
# Default: 50 buffers of 1024 bytes each.
BufferPool.SmallMedium.Size = 50
BufferPool.SmallMedium.BufferSize = 1024

# Medium Buffer Pool
# Size and buffer size for medium buffers. Used for medium network packets.
# Default: 50 buffers of 2048 bytes each.
BufferPool.Medium.Size = 50
BufferPool.Medium.BufferSize = 2048

# Large Medium Buffer Pool
# Size and buffer size for larger medium buffers. Used for larger medium network packets.
# Default: 50 buffers of 4096 bytes each.
BufferPool.LargeMedium.Size = 50
BufferPool.LargeMedium.BufferSize = 4096

# Small Large Buffer Pool
# Size and buffer size for small large buffers. Used for smaller large network packets.
# Default: 25 buffers of 8192 bytes each.
BufferPool.SmallLarge.Size = 25
BufferPool.SmallLarge.BufferSize = 8192

# Large Buffer Pool
# Size and buffer size for large buffers. Used for large network packets.
# Default: 25 buffers of 16384 bytes.
BufferPool.Large.Size = 25
BufferPool.Large.BufferSize = 16384

# Very Large Buffer Pool
# Size and buffer size for very large buffers. Used for very large network packets.
# Default: 25 buffers of 24576 bytes each.
BufferPool.VeryLarge.Size = 25
BufferPool.VeryLarge.BufferSize = 24576

# Maximum Buffer Pool
# Size and buffer size for maximum size buffers. Used for maximum sized network packets.
# Default: 10 buffers of 32768 bytes.
BufferPool.Maximum.Size = 10
BufferPool.Maximum.BufferSize = 32768
