mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 10:08:15 -05:00
Added function Stub
This commit is contained in:
parent
a6612a2baa
commit
8fe53261cc
7
transport/internet/domainsocket/dial.go
Normal file
7
transport/internet/domainsocket/dial.go
Normal file
@ -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
Block a user