add option to set max size of outgoing UDP packets (#1588) (#1601)
Some checks failed
apidocs
code
mod-tidy
test32
test64
test_highlevel

This commit is contained in:
Alessandro Ros
2023-03-31 11:53:49 +02:00
committed by GitHub
parent ebc723d9d4
commit 5b61983fa6
21 changed files with 144 additions and 82 deletions

View File

@@ -21,6 +21,7 @@ import (
const (
multicastTTL = 16
udpMTU = 1472
)
var opusDurations = [32]int{
@@ -127,7 +128,7 @@ func (s *udpSource) run(ctx context.Context, cnf *conf.PathConf, reloadConf chan
}
}
midbuffer := make([]byte, 0, 1472) // UDP MTU
midbuffer := make([]byte, 0, udpMTU)
midbufferPos := 0
readPacket := func(buf []byte) (int, error) {