Michael Sweet wrote:

> It would be useful to add this test program to FLTK as a unit test
> for Fl::add_fd, then we can work out the problems with async
> select...

Yes, I thought of something like this, but unfortunately, this
feature is deeply embedded in an application and can't be
isolated easily. If I can find the time, I'll try to create
a short test case, if nobody else volunteers.

Meanwhile I added some test statements to Fl_win32.cxx, and I found
that there is no WM_FLSELECT message delivered, when it should be:

in fl_wait(), line 321 ff. (in my current version):

   // Execute the message we got, and all other pending messages:
   have_message = PeekMessage(&fl_msg, NULL, 0, 0, PM_REMOVE);
   if (have_message > 0) {
     while (have_message != 0 && have_message != -1) {
#ifdef USE_ASYNC_SELECT
       if (fl_msg.message == WM_FLSELECT) {
        // Got notification for socket
        printf ("USE_ASYNC_SELECT: got WM_FLSELECT message for socket 
%d\n",(int)fl_msg.wParam);

[...]

this printf() is not executed, when I sent a tcp message to the
program after add_fd(), as described previously. Without
USE_ASYNC_SELECT, the s_wsock_select() call returns success,
and the callback is called.

Albrecht
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to