Solved

How to send text by DNS address ?

Posted on 1998-07-22
3
191 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
This video teaches viewers about errors in exception handling.

763 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

10 Experts available now in Live!

Get 1:1 Help Now