Suppression - système interface
This commit is contained in:
parent
345e195b81
commit
751fb5ef1a
@ -50,7 +50,6 @@ func (client ClientMulticast) Run() {
|
|||||||
if failedRIA {
|
if failedRIA {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
println("Interface ", lAddr.IP.String())
|
|
||||||
|
|
||||||
// Init UDP server flux
|
// Init UDP server flux
|
||||||
con, failedDU := client.DialUdp(lAddr, rAddr)
|
con, failedDU := client.DialUdp(lAddr, rAddr)
|
||||||
@ -87,7 +86,7 @@ func ResolveInterfaceAddr(inter string) (*net.UDPAddr, bool) {
|
|||||||
//for _, addr := range addrs {
|
//for _, addr := range addrs {
|
||||||
// if utils.IsIPv4(addr.String()) {
|
// if utils.IsIPv4(addr.String()) {
|
||||||
// println("Selected IP", addr.String())
|
// println("Selected IP", addr.String())
|
||||||
// lAddr, _ := net.ResolveUDPAddr("udp", "192.168.86.25:15502")
|
// lAddr, _ := net.ResolveUDPAddr("udp", "127.0.0.1:15502")
|
||||||
// return lAddr, false
|
// return lAddr, false
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
@ -96,7 +95,7 @@ func ResolveInterfaceAddr(inter string) (*net.UDPAddr, bool) {
|
|||||||
|
|
||||||
// DialUdp Ouvre une connection UDP
|
// DialUdp Ouvre une connection UDP
|
||||||
func (client ClientMulticast) DialUdp(lAddr *net.UDPAddr, rAddr *net.UDPAddr) (*net.UDPConn, bool) {
|
func (client ClientMulticast) DialUdp(lAddr *net.UDPAddr, rAddr *net.UDPAddr) (*net.UDPConn, bool) {
|
||||||
con, errDial := net.DialUDP("udp", lAddr, rAddr)
|
con, errDial := net.DialUDP("udp", nil, rAddr)
|
||||||
if errDial != nil {
|
if errDial != nil {
|
||||||
println(errDial.Error())
|
println(errDial.Error())
|
||||||
return nil, true
|
return nil, true
|
||||||
|
@ -21,6 +21,10 @@ func NetworkLister() {
|
|||||||
println("\n\nNetwork interface list :")
|
println("\n\nNetwork interface list :")
|
||||||
for i, val := range inter {
|
for i, val := range inter {
|
||||||
fmt.Printf("%d. %s\n", i, val.Name)
|
fmt.Printf("%d. %s\n", i, val.Name)
|
||||||
|
addrs, _ := val.Addrs()
|
||||||
|
for _, addr := range addrs {
|
||||||
|
println("-- ", addr.String())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print("\n")
|
print("\n")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user