mirror of
https://git.sr.ht/~rjarry/aerc
synced 2026-03-02 18:23:33 +01:00
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>
18 lines
341 B
Go
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)
|
|
}
|