safesocket: simplify API.

On unix, we want to provide a full path to the desired unix socket.

On windows, currently we want to provide a TCP port, but someday
we'll also provide a "path-ish" object for a named pipe.

For now, simplify the API down to exactly a path and a TCP port.

Signed-off-by: David Anderson <dave@natulte.net>
This commit is contained in:
David Anderson
2020-02-18 12:33:28 -08:00
committed by Dave Anderson
parent b72e6446e2
commit 4460bd638b
6 changed files with 29 additions and 23 deletions

View File

@ -10,7 +10,7 @@ import (
)
func TestBasics(t *testing.T) {
l, port, err := Listen("COOKIE", "Tailscale", "test", 0)
l, port, err := Listen("test", 0)
if err != nil {
t.Fatal(err)
}
@ -42,7 +42,7 @@ func TestBasics(t *testing.T) {
}()
go func() {
c, err := Connect("COOKIE", "Tailscale", "test", port)
c, err := Connect("test", port)
if err != nil {
errs <- err
return