Creating a TCP/IP connection on already-networked computers

Grant Edwards grante at visi.com
Sat Jun 14 21:17:56 CEST 2008


On 2008-06-14, John Salerno <johnjsal at gmailNOSPAM.com> wrote:
> John Salerno wrote:
>> if the program I write actually works and allows the two 
>> computers to speak to each other, will that be a result purely of the 
>> program, or will it have anything to do with the fact that they are 
>> already on a home network together?
>
> Here are the two programs. Server first, then client. They work, which 
> in itself amazes me that it's so simple to create a network connection 
> like this! But my basic question is this: would this connection work if 
> the two computers (each running one of these scripts) were completely 
> unrelated to one another?

That depends on your definition of "unrelated."

> My two are on a home network, but if I were to run the server
> program and have a friend of mine (who lives somewhere else)
> run the client program, would it still work?

Yes, if the routers/firewalls/PCs were set up properly and if
you changed the IP addresses in the programs appropriately.

-- 
Grant Edwards                   grante             Yow! I want the presidency
                                  at               so bad I can already taste
                               visi.com            the hors d'oeuvres.



More information about the Python-list mailing list