Creating a TCP/IP connection on already-networked computers

Timothy Grant timothy.grant at gmail.com
Sat Jun 14 21:10:10 CEST 2008


On Sat, Jun 14, 2008 at 11:54 AM, John Salerno <johnjsal at gmailnospam.com>
wrote:

> John Salerno wrote:
>
>  -----
>> #!/usr/bin/env python
>>
>> from socket import *
>> from time import ctime
>>
>> HOST = '192.168.1.100'
>>
>
>
>  -----
>> #!/usr/bin/env python
>>
>> from socket import *
>>
>> HOST = '192.168.1.100'
>>
>
> A question about this. Is the "HOST" referring to the IP address of the
> server computer in both of these cases? Because when I ran the program and
> got to the part where it says "connected from:" on the server side, it shows
> this same IP address. Shouldn't it be something different, since the
> requests are coming from a different computer than the server computer?
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>

John,

It looks to me as if you're running both client and server on the same box,
and in effect conecting to yourself.

You asked in an earlier message if a friend on a different network could
connect to you using your client programme and that depends on a LOT of
things. Your friend certainly wouldn't be able to using the 192.168.x.x
address as that is an unroutable address. But you would likely have a bit of
work to do to get it to work through you and your friend's firewalls (that
is likely a conversation for a later time though.


-- 
Stand Fast,
tjg.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080614/a213915b/attachment.html>


More information about the Python-list mailing list