mirror of
				https://github.com/v2fly/v2ray-core.git
				synced 2025-10-31 09:49:40 +00: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 | 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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Shelikhoo
						Shelikhoo