I'm creating a chat program. I guess i'm a bit confused as to how MSN and other chats work? Currently, i'm putting in the localhost ip address and just connecting to myself. I'm able to get my client and server programs communicating back and forth. My question is, is there a way where i can NOT ask the user for an IP address? I also manually enter in the port number of which i want both programs to connect to. Is there a way to avoid this too?
I would much rather ask the user for just a User name and password!
After a bit of research i came to know about the following:
IPAddress[] localIPs = Dns.GetHostAddresses(Dns.GetHostName());
However, the line of code above returns all the machine's IP addresses. How would i know which one to use?
I'm not that knowledgeable about IP addresses, so any background information and help would be awesome.