diff --git a/transport/internet/domainsocket/dial.go b/transport/internet/domainsocket/dial.go index 99d34ccb..0c2174cd 100644 --- a/transport/internet/domainsocket/dial.go +++ b/transport/internet/domainsocket/dial.go @@ -1,7 +1,19 @@ package domainsocket -import "context" +import ( + "context" + "net" +) -func DialDS(ctx context.Context, path string) { +func DialDS(ctx context.Context, path string) (*net.UnixConn, error) { + resolvedAddress, err := net.ResolveUnixAddr("unixpacket", path) + if err != nil { + return nil, err + } + dialedUnix, err := net.DialUnix("unixpacket", nil, resolvedAddress) + if err != nil { + return nil, err + } + return dialedUnix, nil }