Solved

How to send text by DNS address ?

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mapAB Challlenge 35 143
Can we place a tooltip on the actual vb6 form 5 41
Problem to open text file 11 108
Create Files based on Cell Values in a Range in Excel 12 38
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…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

776 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