Question

How can i specify specific ipaddress:port for udpclient to receive? im confused with updclient.client.localendpoint and udpclient.client.remoteendpoint. i was thinking maybe its remoteendpoint, but i cannot display remoteendpoint value. plus my local endpoint ip is 0.0.0.0. what is that mean?

Was it helpful?

Solution

0.0.0.0 means "any address". The local endpoint is the IP address and port you will listen for packets on. The remote endpoint is not required for UdpClient objects. It only specifies the default host to send a packet to, if you do not specify one when sending the packet.

You can leave the local endpoint as 0.0.0.0 if you want to listen for traffic on all of your assigned IP addresses on all of your network connections. You only need to change this if you only want to listen on one particular address/connection.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top