Creating a TCP/IP connection on already-networked computers

Grant Edwards grante at visi.com
Sun Jun 15 03:59:32 CEST 2008


On 2008-06-15, John Salerno <johnjsal at gmailNOSPAM.com> wrote:
> Grant Edwards wrote:
>
>> If the two computers are in no way connected via any type of
>> network, then the two programs won't be able to talk to each
>> other.
>> 
>> The programs can't create a network, they can only use one that
>> already exists.
>
> But isn't that the point of the program, to create a network between the 
> two computers?

No.  For the two programs to work, the network must already
exist and be properly configured.  In this seinse, a "network"
is a mechanism which programs can use to establish connections
with each other.

> Isn't that what the host and port are used for, to open a 
> connection?

Yes, but a connection and a network aren't the same.  When you
pick up the phone and dial it, a connection between your phone
and the phone your calling is set up.  You dialing the phone
isn't creating a telephone phone network -- it's using the
existing telephone network to create a connection.  In the case
of the telephones, the "network" is the wires, the central
office switches (and associated software), and the
interconnecting trunks.  In your house, the "network" is the
wires and router and cable modem and network cards (and the
associated configuration data).  Your "home network" may or may
not have a connection to the outside world.

> (Just to clarify, when I say "in no way connected", I don't
> mean not connected to the internet in general. I know they
> need access to the internet for any kind of networking program
> to work at all.)

No, the two computers don't need to be connected to the
internet in general.  You could set up a network that consists
entirely of those two computers and nothing else.  Applications
on those two computers could still communication with each other.

-- 
Grant Edwards                   grante             Yow!  Why don't you
                                  at               ever enter and CONTESTS,
                               visi.com            Marvin?? Don't you know
                                                   your own ZIPCODE?



More information about the Python-list mailing list