This is driving me crazy !! evtloop windows

Right. I encountered yet another problem with libwww (or better.. with my
lack of understanding of it. ) Using version 5.3.2 i'm trying to get an
application to work under windows (2000).

The source code which does the main work looks , roughly, as follows:

	/* Start listening, might come in handy :-( */

	if (listen(pr_evt_info->i_tsap_listen_socket, 10) == -1)
	{
	}
			
printf("<start> Create new event\n");
	pr_evt_info->pr_tsap_read_event = HTEvent_new(evt_listen_read_cb,
						 pr_evt_info,
						 HT_PRIORITY_MAX,
						 -1);
printf("</start> Create new event\n");

	if (pr_evt_info->pr_tsap_read_event == NULL)
	{
		return 0;
	}

printf("<start> HTEventList_register\n");
	if ((i_res = HTEventList_register(pr_evt_info->i_tsap_listen_socket,
						 HTEvent_ACCEPT,
	
pr_evt_info->pr_tsap_read_event)) != HT_OK)
	{
		printf("RED ALERT : HTEventList return code = %d\n", i_res);
	};
printf("</start> HTEventList_register\n");

	
/*
	window = HTEventList_getWinHandle(&pmsg);
	printf("Window = %lx\n", window);

	
	i_res = WSAAsyncSelect(pr_evt_info->i_tsap_listen_socket,
		window,
		pmsg,
		FD_ACCEPT);

	if (i_res ==  SOCKET_ERROR)
	{
		printf("%d\n", WSAGetLastError());
	}

     */


After which the function HTEventList_newLoop() is called somewhere in order
to handle the received messages. The thing is... the eventloop receives
nothing (at all!). So I tried the WSAAsync... call myself, and then i can
see that messages are received. (After hacking in the HTEvtLst.c code :-(
). So it seems to me something is not completely OK with the Event
definitions in HTEvent.h.

Am i doing something wrong or forgetting something ? Any help would be
greatly appreciated..

Received on Tuesday, 3 July 2001 06:12:06 UTC