W3C home > Mailing lists > Public > www-lib@w3.org > July to September 1998

Connection time-out when running libapp_4 example (follows).

From: François VILMAIN <vilmain@cegelec-red.fr>
Date: Wed, 5 Aug 1998 11:43:58 +0200
Message-ID: <01BDC066.58BC3B10@DT3P1744>
To: "'WWWlib'" <www-lib@w3.org>

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 */
/* Look up the server in the hosts file or wherever (obtained IP address is */
 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 ?

Received on Wednesday, 5 August 1998 05:43:01 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:48 UTC