|
|
@@ -46,13 +46,3 @@ func setTCPUserTimeout(conn syscall.RawConn, cfg net.KeepAliveConfig) {
|
|
46
|
46
|
unix.SetsockoptInt(int(fd), unix.IPPROTO_TCP, unix.TCP_USER_TIMEOUT, int(timeout.Milliseconds())) //nolint: errcheck
|
|
47
|
47
|
})
|
|
48
|
48
|
}
|
|
49
|
|
-
|
|
50
|
|
-func setCongestionControl(conn syscall.RawConn) {
|
|
51
|
|
- conn.Control(func(fd uintptr) { //nolint: errcheck
|
|
52
|
|
- // BBR provides better throughput over lossy and high-latency links compared
|
|
53
|
|
- // to the default cubic, which is especially beneficial for mobile and
|
|
54
|
|
- // home internet clients. This is best-effort: silently ignored if the
|
|
55
|
|
- // kernel does not have tcp_bbr available.
|
|
56
|
|
- unix.SetsockoptString(int(fd), unix.IPPROTO_TCP, unix.TCP_CONGESTION, "bbr") //nolint: errcheck
|
|
57
|
|
- })
|
|
58
|
|
-}
|