PDA

Click to See Complete Forum and Search --> : Linking two remote computers


VBZeroPlus
Feb 19th, 2006, 07:57 AM
This is probably a dumb question, but might solicit some good discussion.

Is it possible to make applications on two computers find one another and communicate without using any external web site or servers to provide location or connection information?

I have a program that I provide to users and would like to have access from my own machine.

Thanks in advance

Jmacp
Feb 19th, 2006, 03:59 PM
No, you need something to physically accept a connection such as winsock.

AIS4U
Feb 19th, 2006, 04:09 PM
VBZeroPlus:

As long as two computers are both connected to a phone line they can talk to each other.

the182guy
Feb 19th, 2006, 04:59 PM
This is probably a dumb question, but might solicit some good discussion.

Is it possible to make applications on two computers find one another and communicate without using any external web site or servers to provide location or connection information?

I have a program that I provide to users and would like to have access from my own machine.

Thanks in advance

Actually it is possible to do what your asking, which is:

Have an app on one computer, and an app on the other computer....have one computer find the other and establish a connection without any external servers or connections.

How is it done? well one way which will certainly work is by scanning an IP range for the computer which is listening. This would be best if you knew the IP range of the ISP (Internet Service Provider) which is providing internet service for the server app, so for example the ISP IP range might be 88.164.x.x, then you would need to scan the last to octets of the IP for servers on your port.

But why dont you want to use external websites? It would be so easy to just have a text file on a website which holds the IP of the server app. You could make a script on the website change the IP in the textfile to the latest IP when the server is started

VBZeroPlus
Feb 20th, 2006, 08:43 PM
I know nothing about programming websites and very little about IP related programming, but it does seem obvious that a website to store and relay the connection address would be simple. I was just inquiring about doing it without a website, since I have more familiarity with VB, and that would be a more unique solution in my way of thinking.

If it requires knowing some range of IP addresses that will be scanned, that is not a very universal approach.

the182guy
Feb 20th, 2006, 09:26 PM
I know nothing about programming websites and very little about IP related programming, but it does seem obvious that a website to store and relay the connection address would be simple. I was just inquiring about doing it without a website, since I have more familiarity with VB, and that would be a more unique solution in my way of thinking.

If it requires knowing some range of IP addresses that will be scanned, that is not a very universal approach.

Doesnt require knowing the IP range, but if you do it will make your program find the IP hundreds of times faster, you literally would be there all day if not more, scanning every IP combination if you think about it, anything under 255.255.255.255 will take almost forever!

Put the server IP in a textfile on a web server and use the Inet control to get the IP like
ServerIP = Inet1.OpenURL("http://myhost.com/myaccount/server.txt")
The Inet control is under the name 'MS Internet Transfer Control'

But if your using winsock in your app to connect to your other computer, you might aswell use winsock to get the IP, then you dont need the inet. So connect your socket to port 80 of your host domain such as brinkster.com the send
'GET /myaccount/server.txt HTTP/1.1' & vbCrLf & vbCrLf

The server will send back the contents of the txt file along with a HTTP header.

If your server app had a static IP then obviously you wouldnt need to find the IP. Or if you bought a domain name for your server computer, you could just connect via the domain name, but you would need to update the domain IP resolution when your server IP changes