mirror of https://github.com/v2ray/v2ray-core
Added function Stub
parent
a6612a2baa
commit
8fe53261cc
|
@ -0,0 +1,7 @@
|
|||
package domainsocket
|
||||
|
||||
import "context"
|
||||
|
||||
func DialDS(ctx context.Context, path string) {
|
||||
|
||||
}
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue