Solved

How to send text by DNS address ?

Posted on 1998-07-22
3
203 Views
Last Modified: 2013-11-13
With a simple winsock chit-chat program, i can send text by a IP address. But how do i send text to a listening user using its DNS name, without knowing its IP address ?

Another question is: By using x.x.x.0, i can broadcast to all users, izit ? or how can i broadbast to every users ?

Thanks for your answers,
Collin Ng
0
Comment
Question by:collinng
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
wizard2072098 earned 50 total points
ID: 1466440
With the Winsock control, you can only send to computers via the IP address, or you can use the comptuer name if the computer is on your subnet. If you wanted to create a chat program that runs over the Internet, you'll need to use the IP addresses of the machine.

You can broadcast to all IP's on a subnet by using x.x.x.255, if you use the UDP protocol, not the TCP, since UDP is a connectionless protocol.
0
 

Author Comment

by:collinng
ID: 1466441
i like/accept your answer. But kindly furnish me with more info. As you said, winsock control can only handle IP addr, then what is the popular ways of client/server chit-chat using DNS names ? Is there ?
0
 
LVL 1

Expert Comment

by:wizard2072098
ID: 1466442
In order to use the DNS, you'd have to be able to query the DNS to retrieve the IP. I'm not certain that there are any API's available for VB to reach the DNS. I may be wrong. I don't know of any definitive source of DNS info, such as books, right off hand. You may be able to ping the name via code and retrieve the IP. I'll see if I can find out a cool way of doing it for you.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now