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

Popular posts from this blog

python 3.x - Mapping specific letters onto a list of words -

javascript - jquery or ashx not working -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -