func PingUDP(t *testing.T, ip net.IP, port int) net.Conn {
	network := "udp"
	if isIpv6(ip) {
		network = "udp6"
	}
	addr := &net.UDPAddr{
		IP:   ip,
		Port: port,
	}
	conn, err := net.DialUDP(network, nil, addr)
	require.NoError(t, err)

	_, err = conn.Write([]byte("ping"))
	require.NoError(t, err)

	return conn
}
// PingUDP connects to the provided IP address over UDP/UDPv6, sends the string "ping",
// and returns the open connection for further use/inspection.
PingUDP connects to the provided IP address over UDP/UDPv6, sends the string "ping",
and returns the open connection for further use/inspection.
// PingUDP connects to the provided IP address over UDP / UDPv6 sends the string " ping " // and returns the open connection for further use / inspection .
func PingUDP(t *testing.T, ip net.IP, port int) net.Conn {
	network := "udp"
	if isIpv6(ip) {
		network = "udp6"
	}
	addr := &net.UDPAddr{
		IP:   ip,
		Port: port,
	}
	conn, err := net.DialUDP(network, nil, addr)
	require.NoError(t, err)
	_, err = conn.Write([]byte("ping"))
	require.NoError(t, err)
	return conn
}
func PingUDP ( t * testing . T , ip net . IP , port int ) net . Conn { network := " " if isIpv6 ( ip ) { network = " " } addr := & net . UDPAddr { IP : ip , Port : port , } conn , err := net . DialUDP ( network , nil , addr ) require . NoError ( t , err ) _ , err = conn . Write ( [ ] byte ( " " ) ) require . NoError ( t , err ) return conn }
PingUDP connects to the provided IP address over UDP/UDPv6, sends the string "ping",
and returns the open connection for further use/inspection.
PingUDP connects to the provided IP address over UDP / UDPv6 sends the string " ping " and returns the open connection for further use / inspection .