socket programming

John Hazen john at
Wed Jul 20 01:33:22 CEST 2005

* Helge Aksdal <helge at> [2005-07-19 11:23]:
> if i then change to a console window, and telnet to this server it
> sends me to another one. That's probably why my program dies, how
> can i get my code to handle this?
> Trying
> telnet: connect to address Connection refused
> Trying
> Connected to xxxxxx.xxxxx.
> Escape character is '^]'.

I don't think the server is "sending you to another one".  I think
perhaps DNS returns two IP addresses for the name, and after the first
one fails, your telnet client tries the second?

I'm just guessing, since you didn't include what command you ran to do
the telnet.  As Grant mentioned, the telnet protocol doesn't do


More information about the Python-list mailing list