mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-27 03:55:36 +00:00
a93dc6cdb1
This commit adds a batchingConn interface, and renames batchingUDPConn to linuxBatchingConn. tryUpgradeToBatchingConn() may return a platform- specific implementation of batchingConn. So far only a Linux implementation of this interface exists, but this refactor is being done in anticipation of a Windows implementation. Updates tailscale/corp#21874 Signed-off-by: Jordan Whited <jordan@tailscale.com>
27 lines
500 B
Go
27 lines
500 B
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
//go:build !linux
|
|
|
|
package magicsock
|
|
|
|
import (
|
|
"errors"
|
|
"io"
|
|
|
|
"tailscale.com/types/logger"
|
|
"tailscale.com/types/nettype"
|
|
)
|
|
|
|
func (c *Conn) listenRawDisco(family string) (io.Closer, error) {
|
|
return nil, errors.New("raw disco listening not supported on this OS")
|
|
}
|
|
|
|
func trySetSocketBuffer(pconn nettype.PacketConn, logf logger.Logf) {
|
|
portableTrySetSocketBuffer(pconn, logf)
|
|
}
|
|
|
|
const (
|
|
controlMessageSize = 0
|
|
)
|