mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-03 20:07:38 +03:00
14 lines
224 B
Go
14 lines
224 B
Go
package system
|
|
|
|
import (
|
|
"syscall"
|
|
)
|
|
|
|
const (
|
|
TCP_FASTOPEN = 23
|
|
TCP_FASTOPEN_CONNECT = 30
|
|
)
|
|
|
|
func TCPFastOpen(fd uintptr) error {
|
|
return syscall.SetsockoptInt(int(fd), syscall.SOL_TCP, TCP_FASTOPEN_CONNECT, 1)
|
|
}
|