mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-05-11 03:06:35 +00:00

The idle period is set to 5sec. We now also ping every second since last activity. This makes the quic.Connection less prone to being closed with no network activity, since we send multiple pings per idle period, and thus a single packet loss cannot cause the problem.
21 lines
402 B
Go
21 lines
402 B
Go
//go:build linux
|
|
// +build linux
|
|
|
|
package quic
|
|
|
|
import "golang.org/x/sys/unix"
|
|
|
|
const msgTypeIPTOS = unix.IP_TOS
|
|
|
|
const (
|
|
ipv4RECVPKTINFO = unix.IP_PKTINFO
|
|
ipv6RECVPKTINFO = unix.IPV6_RECVPKTINFO
|
|
)
|
|
|
|
const (
|
|
msgTypeIPv4PKTINFO = unix.IP_PKTINFO
|
|
msgTypeIPv6PKTINFO = unix.IPV6_PKTINFO
|
|
)
|
|
|
|
const batchSize = 8 // needs to smaller than MaxUint8 (otherwise the type of oobConn.readPos has to be changed)
|