I write a program to open tcp/ip socket, it runs OK on sun solaris, but 
in my slackware linux, it compile ok.

There are two program, client and server.

If I run my server program on solaris, run client program on my linux, 
is OK.

If I start server program on linux, OK, but start client program on 
linux will give me a connection error, connect_status==-1 and the error code 
is 111.

anything to do with my setting that i cannot connect through local host, 
i can use telnet <local host>.

client:
    new_sd = socket(AF_INET, SOCK_STREAM, 0);
    (void)memset((char *)&addr, 0, sizeof(addr));
    addr.sin_family             = AF_INET;
    addr.sin_addr.s_addr        = ipaddr;
    addr.sin_port               = htons(port);

    connect_status = connect(new_sd, (struct sockaddr *)&addr, sizeof(addr));

Reply via email to