Solved

How to send text by DNS address ?

Posted on 1998-07-22
3
232 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video teaches viewers about errors in exception handling.
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

690 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