c# - How to automatically get IP to my server program? -
is there possibility obtain ip dhcp server program? want create "receiver" using tcp server obtain data sent arduino.
if'd use ipadress.any
0.0.0.0
ip address.
try these piece of code, think should give need
ipaddress address = null; string serverhostname = ""; serverhostname = dns.gethostname(); iphostentry ipentry = dns.gethostbyname(serverhostname); address = ipentry.addresslist[0];
Comments
Post a Comment