1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 18:17:52 -05:00

Added function Stub

This commit is contained in:
Shelikhoo 2017-11-03 20:02:05 +08:00
parent a6612a2baa
commit 8fe53261cc
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,7 @@
package domainsocket
import "context"
func DialDS(ctx context.Context, path string) {
}

View File

@ -1 +1,22 @@
package domainsocket 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
}