mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	add dummy functions for other platforms
This commit is contained in:
		
							parent
							
								
									bcacfb0638
								
							
						
					
					
						commit
						710815fed5
					
				
					 4 changed files with 10 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -299,7 +299,7 @@ func (t *tcp) call(saddr string, options interface{}, sintf string, upgrade *Tcp
 | 
			
		|||
				Timeout: time.Second * 5,
 | 
			
		||||
			}
 | 
			
		||||
			if sintf != "" {
 | 
			
		||||
				dialer.Control = t.getContextWithBindToDevice(sintf)
 | 
			
		||||
				dialer.Control = t.getControl(sintf)
 | 
			
		||||
				ief, err := net.InterfaceByName(sintf)
 | 
			
		||||
				if err != nil {
 | 
			
		||||
					return
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,3 +26,7 @@ func (t *tcp) tcpContext(network, address string, c syscall.RawConn) error {
 | 
			
		|||
		return control
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (t *tcp) getControl(sintf string) func(string, string, syscall.RawConn) error {
 | 
			
		||||
	return t.tcpContext
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,7 +30,7 @@ func (t *tcp) tcpContext(network, address string, c syscall.RawConn) error {
 | 
			
		|||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (t *tcp) getContextWithBindToDevice(sintf string) func(string, string, syscall.RawConn) error {
 | 
			
		||||
func (t *tcp) getControl(sintf string) func(string, string, syscall.RawConn) error {
 | 
			
		||||
	return func(network, address string, c syscall.RawConn) error {
 | 
			
		||||
		var err error
 | 
			
		||||
		btd := func(fd uintptr) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,3 +11,7 @@ import (
 | 
			
		|||
func (t *tcp) tcpContext(network, address string, c syscall.RawConn) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (t *tcp) getControl(sintf string) func(string, string, syscall.RawConn) error {
 | 
			
		||||
	return t.tcpContext
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue