mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-23 18:15:24 +00:00
add dummy functions for other platforms
This commit is contained in:
parent
bcacfb0638
commit
710815fed5
@ -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…
Reference in New Issue
Block a user