Help: Libww.a Ver. 4.0pre7 - Why doesn't it work?

Except for my mod, the below code is taken out of the example from W3C/Library sect.???

According to the Lib Guide, it should:

"When this program is run, it will take the argument and call the Library to fetch it. As we haven't given any name for
the file which we are creating on our local disk, the Library will prompt the user for a file name. Automatic
redirection and access authentication is handled by the HTTP module but might require the user to type in a user
name and a password..."

*************************** sample code *******************************
#include "WWWLib.h"
#include "HTTP.h"

int main (int argc, char ** argv)
{

    HTList *converters = HTList_new();
    HTRequest *request = HTRequest_new();         /* Create a request
object */

    WWWTRACE |= SHOW_ALL_TRACE;	/*my mod here	*/

    HTLibInit("TestApp", "1.0");
    HTProtocol_add("http", YES, HTLoadHTTP, NULL);
    HTConversion_add(converters, "*/*", "www/present", HTSaveLocally,
1.0, 0.0, 0.0);
    HTFormat_setConversion(converters);
    if (argc == 2) {
        HTLoadAbsolute(argv[1], request);
    } else
        printf("Type the URL to fetch\n");
    HTRequest_delete(request);                  /* Delete the request
object */

********************* end of code ***********************


when I tried to execute "myapp http://18.23.0.22/hypertext/WWW/Library/User/Using/Startup.html", 
I got the following:


**********************TTY dump ************************************
WWWLibInit.. INITIALIZING LIBRARY OF COMMON CODE
Call Add.... HTNetCallback 8053370
TimeZone.... GMT + (-5) hours (including DST)
Tmp Root.... Root set to `/tmp/'
HTSimplify.. `http://18.23.0.22/hypertext/WWW/Library/User/Using/Startup.html' into
............ `http://18.23.0.22/hypertext/WWW/Library/User/Using/Startup.html'
Find Parent. 8072d30 with hash 39 and address `http://18.23.0.22/hypertext/WWW/Library/User/Using/St
artup.html' created
HTAccess.... Accessing document http://18.23.0.22/hypertext/WWW/Library/User/Using/Startup.html
HTNet_newClient..
HTNet New... Using default address
HTNet_new... starting request 8071ee8 (retry=1)
HTTP........ Looking for `http://18.23.0.22/hypertext/WWW/Library/User/Using/Startup.html'
Access Auth. composing authorization for 18.23.0.22:80/hypertext/WWW/Library/User/Using/Startup.html
Access Auth. `hypertext/WWW/Library/User/Using/Startup.html' (so probably not protected)
HTTP........ Not sending authorization (yet)
HTDoConnect. Looking up `18.23.0.22'
ParseInet... as port 80 on 18.23.0.22 with 1 homes
HTDoConnect. Created socket 3
HTDoConnect. Blocking socket
HTAlert find.. opcode 2
HTDoConnect. Connect failed
UnRegister.. SockOps 63
UnRegister.. Didn't find entry for socket 3
Error Add... number:  44        Severity: 1     Parameter: `connect: Connection timed out'      Wher
e: `connect'
HTNetDelete. Object and call callback functions
HTNet_delete Remove net object 8072e38
Net callback 8053370 (request=8071ee8, status=-1)
HTAlert find.. opcode 256
Load End.... ERROR: Can't access `http://18.23.0.22/hypertext/WWW/Library/User/Using/Startup.html'
WWWLibTerm.. Cleaning up LIBRARY OF COMMON CODE
AnchorDelete Remove parent 8072d30 and children

********** end of TTY Dump **************

Notice that there are some TTYPrint's that are mine, I added them to help me see what is going on (:

Some of my questions:

	1.  why didn't it find entry for socket 3?
	2.  should my using "18.23.0.23" cause any problem parsing the URL?
	3.  I don't have the Yellow Page set up on the Unix machine, could it be a pottential problem?

TIA,

vu nguyen

//vu@isdnsys.com
//vun@erols.com

Received on Wednesday, 13 December 1995 09:20:03 UTC