mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-12 05:37:32 +00:00
wgengine/magicsock, etc: remove mostly unused WriteTo methods
Updates #2331 Updates #5162 Change-Id: I8291884425481eeaedde38a54adfd8ed7292a497 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
83c41f3697
commit
29f7df9d8f
@@ -6,8 +6,10 @@ package nettype
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"net"
|
||||
"net/netip"
|
||||
"time"
|
||||
)
|
||||
|
||||
// PacketListener defines the ListenPacket method as implemented
|
||||
@@ -28,9 +30,16 @@ func (Std) ListenPacket(ctx context.Context, network, address string) (net.Packe
|
||||
return conf.ListenPacket(ctx, network, address)
|
||||
}
|
||||
|
||||
// PacketConn is a net.PacketConn that's about halfway (as of 2023-04-15)
|
||||
// converted to use netip.AddrPort.
|
||||
type PacketConn interface {
|
||||
net.PacketConn
|
||||
WriteToUDPAddrPort([]byte, netip.AddrPort) (int, error)
|
||||
ReadFrom(p []byte) (int, net.Addr, error)
|
||||
io.Closer
|
||||
LocalAddr() net.Addr
|
||||
SetDeadline(time.Time) error
|
||||
SetReadDeadline(time.Time) error
|
||||
SetWriteDeadline(time.Time) error
|
||||
}
|
||||
|
||||
func MakePacketListenerWithNetIP(ln PacketListener) PacketListenerWithNetIP {
|
||||
|
Reference in New Issue
Block a user