mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-18 07:41:49 +01:00
This commit uses SO_REUSEPORT (when supported) to bind multiple sockets per address family. Increasing the number of sockets can increase aggregate throughput when serving many peer relay client flows. Benchmarks show 3x improvement in max aggregate bitrate in some environments. Updates tailscale/corp#34745 Signed-off-by: Jordan Whited <jordan@tailscale.com>
20 lines
290 B
Go
20 lines
290 B
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
//go:build !linux
|
|
|
|
package udprelay
|
|
|
|
import (
|
|
"net"
|
|
"syscall"
|
|
)
|
|
|
|
func listenControl(_ string, _ string, _ syscall.RawConn) error {
|
|
return nil
|
|
}
|
|
|
|
func isReusableSocket(*net.UDPConn) bool {
|
|
return false
|
|
}
|