Subject: Re: problem with perl5 and connect
To: None <current-users@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: current-users
Date: 06/01/1995 20:42:51
> jonb@bullbox[20]% pt mail.metronet.com 110
> connect: Connection timed out at pt line 26.
> jonb@bullbox[21]% head -30 pt | tail 10
> $this = pack($sockaddr, AF_INET, 0, $thisaddr);
> $that = pack($sockaddr, AF_INET, $port, $thataddr);
> 
> socket(S, PF_INET, SOCK_STREAM, $proto) || die "socket: $!";
> bind(S, $this) || die "bind: $!";
> connect(S, $that) || die "connect: $!";

> Notice that the name lookup goes fine, even binding to the socket,
> but it won't connect... 8-(  Any help would be appreciated,

Did you try tracing it to see what address it's _really_ trying to
connect to?  You may have the address in the wrong byte order, which
would do it if you're on a little-endian machine.  (The port may also
be in the wrong byte order but if the address is right and the port is
wrong, I'd expect a fast "Connection refused" rather than a timeout.)

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu