Http Server

Hi,
I tried to run an httpserver example,
but It Does'nt work : no action when client connect.
I test in local mode using : http://localhost:6000 (port 6000)
I read the Doc HTAcces.html , section : "Serve a Request" and I did all
It's explaned there.
I began with the listen.c example and I modified to my work.
Following the seignificative code.
SomeOne Can help me?
Thanks in advance

main()
{
.......
    /* Set up a tool to listen on this port */
    if (ms->port >= 0) {

	/* Register TCP as the transport */
	HTTransport_add("tcp", HT_TP_SINGLE, HTReader_new, 
HTWriter_new);

	HTProtocol_add("http", 	"tcp", ms->port,	NO,	NULL,
	HTServHTTP);

	/* Set up the request */
	ms->request = HTRequest_new();
	HTRequest_setOutputFormat(ms->request, DEFAULT_FORMAT);
	HTRequest_setOutputStream(ms->request,
				  HTFWriter_new(ms->request, OUTPUT, 
YES));

	/* Start listening on the socket */
	HTPrint("Listening on port %d\n", ms->port);
	if ((status = HTServeAbsolute("http://localhost:6000", ms-
>request)) == NO) {
	    HTPrint("Can't listen on port %d\n", ms->port);
	    Cleanup(ms, -1);
	}

	/* Go into the event loop... */
	if (status == YES) HTEventList_newLoop();
    }
    Cleanup(ms, 0);
    return 0;
} // end main

Received on Wednesday, 27 February 2002 10:00:58 UTC