Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Sep : Need help on simple understanding of connections...
| Subject: | Need help on simple understanding of connections... |
| Posted by: | "Warren O. Merrill" (w..@inel.gov) |
| Date: | Tue, 19 Sep 2006 17:25:22 |
Could someone please just get me over this hurdle of understanding
connections. I'm just trying to play with a simple example program that I
downloaded called P2P Chat to start understanding how all this works.
On the dialog that pops up for the example program it has two entries that I
don't understand. One says 'Listen on and is defaulted to 1000. The other
says 'Host:' and has a default of 127.0.0.1:1000. I do understand that the
127.0.0.1 is referring to my local machine address.
What I don't understand is how to simply bring up two copies of this and see
the basics of how it works. I often get a number of errors popping up and
I'm sure its related to how the two sets of numbers are set.
1) Do I start two copies of this same test program on the same machine or
two different machines (or can it be used either way)?
2) If I start both on the same machine what settings do I use for the two
copies (i.e. both set to listen on 1000 and Host as 127.0.0.1:1000?)
3) If I use two different machines how would I set things (assuming I know
the real IP addresses of those machines)?
I know I just don't grasp yet how to set the numbers. Do the four numbers
all have to be different or the same? Is the listening number set to the
same as the Host number in the same copy of the app or the Host number of
the other copy of the app? See what I'm driving at, just a little primer
on what these mean would help me.
So please fill in the example below:
If I start two copies of the app on the local machine I should set the
params so it works as follows:
App copy #1 Listen on set to: 1000 ???
App copy #1 Host set to: 127.0.0.1:1000 ???
App copy #2 Listen on set to: 1000 ???
App copy #2 Host set to: 127.0.0.1:1000 ???
If I start two copies of the app on two different machines I should set the
params so it works as follows (I understand the basic IP part of the address
will be my own IPs):
App copy #1 Listen on set to: 1000 ???
App copy #1 Host set to: 127.0.0.1:1000 ???
App copy #2 Listen on set to: 1000 ???
App copy #2 Host set to: 127.0.0.1:1000 ???