- From: François VILMAIN <vilmain@cegelec-red.fr>
- Date: Wed, 5 Aug 1998 11:43:58 +0200
- To: "'WWWlib'" <www-lib@w3.org>
Hi. First, thanks for your rapid reply. In fact, my real problem is to create the connection with "www.w3.org". In order to investigate this problem, I wrote a little application that reproduces part of the job that is carried out by libwww : struct sockaddr_in server; SOCKET sock; struct hostent *h; /* Create a stream socket */ sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); /* Look up the server in the hosts file or wherever (obtained IP address is 18.23.0.22) */ h = gethostbyname("www.w3.org"); /* Build server's address for connecting */ server.sin_family = PF_INET; memcpy(&server.sin_addr, h->h_addr, h->h_length); server.sin_port = htons(80); /* Connect to server */ if (connect(sock, (struct sockaddr *)&server, sizeof server) == SOCKET_ERROR) { ... // The report returned by the connect service is "Attempt to connect timed out without establishing a connection". } Any suggestions ? Thanks.
Received on Wednesday, 5 August 1998 05:43:01 UTC