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:

committed by
Dave Anderson

parent
b72e6446e2
commit
4460bd638b
@ -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
|
||||
|
Reference in New Issue
Block a user