diff --git a/transport/internet/domainsocket/dial.go b/transport/internet/domainsocket/dial.go new file mode 100644 index 000000000..99d34ccbc --- /dev/null +++ b/transport/internet/domainsocket/dial.go @@ -0,0 +1,7 @@ +package domainsocket + +import "context" + +func DialDS(ctx context.Context, path string) { + +} diff --git a/transport/internet/domainsocket/listener.go b/transport/internet/domainsocket/listener.go index 7a90db68e..ebeff7d9b 100644 --- a/transport/internet/domainsocket/listener.go +++ b/transport/internet/domainsocket/listener.go @@ -1 +1,22 @@ package domainsocket + +import ( + "context" + "net" +) + +type Listener struct { + ln net.Listener +} + +func ListenDS(ctx context.Context, path string) (*Listener, error) { + addr := new(net.UnixAddr) + addr.Name = path + addr.Net = "unixpacket" + li, err := net.ListenUnix("unixpacket", addr) + if err != nil { + return nil, err + } + vln := &Listener{ln: li} + return vln, nil +}