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

RE: activate the eventloop

From: Derruau, Mathias <Mathias_Derruau@hplb.hpl.hp.com>
Date: Tue, 26 Sep 2000 09:10:56 +0100
Message-ID: <5E13A1874524D411A876006008CD059FAA34D8@0-mail-1.hpl.hp.com>
To: "'www-lib@w3.org'" <www-lib@w3.org>

first, thank you all for your helpful advice.

I informed myself a little bit more about the Windows messages (I am
currently working under Windows, but have to port it to Unix too), but in
fact, with libwww, you don't have to explicitly use these messages, as
libwww uses WSAAsyncSelect to register message-based notification of network
events for a socket. Thus, the method HTEventList_register is the right one.

What happened to me, is that I used the socket attached to the event only to
activate the eventloop and thus the callback registered in the event, and
not properly to receive data. That means that the functions recv() or
recvfrom() were never used in the WWW_WIN_ASYNC version. And with the
function WSAAsyncSelect (if the event is READ), new messages are only passed
to the window if a call to recv() or recvfrom() has been made since the last
message passed. As I didn't make these calls, only the first data sent to
the socket resulted in a message to the eventloop window, and the eventloop
was only activated once.

I admit my use of the eventloop was a bit unusual, but the described problem
wasn't obvious for me. Should it be the object of a comment in the
WWW_WIN_ASYNC version of the code of the eventloop?

Again thanks to all for your help

Mathias Derruau
Received on Tuesday, 26 September 2000 04:11:03 UTC

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