c17ceef093
Change-Id: Iec42524f83619c22d8be26f373978e8abd468ee8
24 lines
517 B
Go
24 lines
517 B
Go
// Copyright (C) 2023 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package server
|
|
|
|
import (
|
|
"syscall"
|
|
|
|
"go.uber.org/zap"
|
|
)
|
|
|
|
const tcpFastOpenServer = 15
|
|
|
|
func setTCPFastOpen(fd uintptr, queue int) error {
|
|
return syscall.SetsockoptInt(syscall.Handle(fd), syscall.IPPROTO_TCP, tcpFastOpenServer, 1)
|
|
}
|
|
|
|
func tryInitFastOpen(*zap.Logger) {
|
|
// should we log or check something along the lines of
|
|
// netsh int tcp set global fastopen=enabled
|
|
// netsh int tcp set global fastopenfallback=disabled
|
|
// ?
|
|
}
|