From owner-freebsd-hackers Sun May 24 06:48:25 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA19256 for freebsd-hackers-outgoing; Sun, 24 May 1998 06:48:25 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from isis.uniandes.edu.co (root@Isis.uniandes.edu.co [157.253.50.5]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA19231 for ; Sun, 24 May 1998 06:48:15 -0700 (PDT) (envelope-from y-carden@uniandes.edu.co) Received: from isis.uniandes.edu.co (y-carden@Isis.uniandes.edu.co [157.253.50.5]) by isis.uniandes.edu.co (8.8.8/8.8.8) with SMTP id IAA12933 for ; Sun, 24 May 1998 08:50:42 +0500 (GMT) Date: Sun, 24 May 1998 08:50:42 +0500 (GMT) From: Yonny Cardenas Baron To: hackers BSD Subject: Progm with sockets Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi I'm doing a program with sockets in my box with FreeBSD 2.2.5, the server run good, but the client, show next error message: Client: connect failure 49 client: : No such file or directory I don't know that is wrong ... #define SERV_TCP_PORT 4000 #define SERV_HOST_ADDR "127.0.0.1" ... sockfd = socket ( AF_INET , SOCK_STREAM, 0 ); ... bzero ((char *) &serv_addr, sizeof (serv_addr)); serv_addr.sin_family = AF_INET ; serv_addr.sin_addr.s_addr = inet_addr(SERV_HOST_ADDR ) ; serv_addr.sin_port = htonl (SERV_TCP_PORT) ; if (connect(sockfd,(struct sockaddr *)&serv_addr,sizeof(serv_addr))<0){ printf("Client: connect failure %d\n", errno); perror("client: "); exit(1); } ... Thanks for your help ------------------------------------ YONNY CARDENAS B. e-mail : y-carden@uniandes.edu.co To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message