ryanclem has asked for the wisdom of the Perl Monks concerning the following question:

Im trying to make a messenger for aim,icq,yahoo and msn. i downloaded packages from cpan while aim and icq worked. yahoo and msn kept breaking. I checked the error for each module and they both failed on this function:
IO::Socket::INET error message is : Connection refused at /usr/local/lib/perl/5.6.1/MSN +.pm line 139
any comments or suggestions why i can't connect to the socket ??

edited: Tue Jul 1 13:38:11 2003 by jeffa - code tags

Replies are listed 'Best First'.
Re: Socket problem
by castaway (Parson) on Jul 01, 2003 at 10:19 UTC
    2 guesses:
    1. Server/Port combination is incorrect/has changed since the module was made (assuming they are built-in values).
    2. Some Firewall/Proxy whatever error. (Unlikely if you can connect using the normal clients.)

    Look to see which server/port its trying to connect to, run a normal client, and see which one that uses. ?

    C.

Re: Socket problem ("refused")
by tye (Sage) on Jul 01, 2003 at 15:05 UTC

    BTW, "connection refused" always1 means that you are able to reach the host you requested but that that host does not have a service listening on the port number you requested.

    1 Actually, this is only always true when connecting to systems that only support sockets for TCP/IP. If you program TCP/IP in some non-socket ways, then you can get control of the 3-way TCP connect handshake such that you can "listen" for connections on a port but refuse some connections (perhaps based on the source IP address / port number). But I've never seen anyone do that.

                    - tye