Solved

How to send text by DNS address ?

Posted on 1998-07-22
3
230 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Child Form in front 4 65
MsgBox 4 75
Create Files based on Cell Values in a Range in Excel 12 44
Link failure 16 89
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

737 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