increase UDP receive buffer size

This commit is contained in:
Marten Seemann
2020-09-15 16:37:03 +07:00
parent 51fd3c33b2
commit 14a5aa831d
4 changed files with 74 additions and 1 deletions

View File

@@ -2,6 +2,9 @@ package protocol
import "time"
// DesiredReceiveBufferSize is the kernel UDP receive buffer size that we'd like to use.
const DesiredReceiveBufferSize = (1 << 20) * 2 // 2 MB
// MaxPacketSizeIPv4 is the maximum packet size that we use for sending IPv4 packets.
const MaxPacketSizeIPv4 = 1252