Files
aerc-fork-mirror/lib/keepalive_linux.go
Robin Jarry bf9f3a4eff treewide: run go modernize
This is the result of the following command:

go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest -fix ./...

Signed-off-by: Robin Jarry <robin@jarry.cc>
2025-12-20 18:06:30 +01:00

18 lines
341 B
Go

//go:build linux
package lib
import (
"syscall"
)
func SetTcpKeepaliveProbes(fd, count int) error {
return syscall.SetsockoptInt(
fd, syscall.IPPROTO_TCP, syscall.TCP_KEEPCNT, count)
}
func SetTcpKeepaliveInterval(fd, interval int) error {
return syscall.SetsockoptInt(
fd, syscall.IPPROTO_TCP, syscall.TCP_KEEPINTVL, interval)
}