You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/safesocket/safesocket_js.go

22 lines
403 B
Go

// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
package safesocket
import (
"context"
"net"
"github.com/akutz/memconn"
)
const memName = "Tailscale-IPN"
func listen(path string) (net.Listener, error) {
return memconn.Listen("memu", memName)
}
func connect(ctx context.Context, _ string) (net.Conn, error) {
return memconn.DialContext(ctx, "memu", memName)
}