Get the destination IP address of the UDP packet

When using C # UDPClient to retrieve data, how to determine if the received datagram was a broadcast packet or not?

I can determine the source IP address by reading the endpoint from UdpClient.Receive (endpoint), but I cannot figure out how to get the remote IP address of the packet. Is there any way to do this?

+4
source share
1 answer

updClient.Client.RemoteEndPoint will be of type IPEndPoint , which has the Adrdress property.

0
source

All Articles