add UDPReadBufferSize option (#857)

This commit is contained in:
Alessandro Ros
2025-08-11 10:49:54 +02:00
committed by GitHub
parent a560c2c24a
commit 7a5df14b2c
11 changed files with 110 additions and 12 deletions

View File

@@ -430,6 +430,10 @@ type Client struct {
// at least a packet within this timeout, otherwise it switches to TCP.
// It defaults to 3 seconds.
InitialUDPReadTimeout time.Duration
// Size of the UDP read buffer.
// This can be increased to reduce packet losses.
// It defaults to the operating system default value.
UDPReadBufferSize int
// Size of the queue of outgoing packets.
// It defaults to 256.
WriteQueueSize int