mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-16 18:08:40 +00:00
![Andrew Lytvynov](/assets/img/avatar_default.png)
This type seems to be a migration shim for TCP tailscaled sockets (instead of unix/windows pipes). The `port` field was never set, so it was effectively used as a string (`path` field). Remove the whole type and simplify call sites to pass the socket path directly to `safesocket.Connect`. Updates #cleanup Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
21 lines
359 B
Go
21 lines
359 B
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
package safesocket
|
|
|
|
import (
|
|
"net"
|
|
|
|
"github.com/akutz/memconn"
|
|
)
|
|
|
|
const memName = "Tailscale-IPN"
|
|
|
|
func listen(path string) (net.Listener, error) {
|
|
return memconn.Listen("memu", memName)
|
|
}
|
|
|
|
func connect(_ string) (net.Conn, error) {
|
|
return memconn.Dial("memu", memName)
|
|
}
|