Menu

#1 Event-Handling need improvement

v1.0
open-accepted
Main Module (1)
7
2002-08-14
2002-08-14
No

When the client is performing a (long) task on the
server (i.e. connecting without getting a reply ->
timeout), no other events get carried out (such as
Hang-up or Exit).
Try hitting "Exit" while connecting to a non-existing
host or while refreshing Status... Nothing happens!

Discussion

  • Markus Treinen

    Markus Treinen - 2002-08-14

    Logged In: YES
    user_id=594089

    This is due to the nature of the used
    Winsock-abstraction-library. While performing a server-task
    (i.e. connecting), the code executes in a loop to wait for
    response from the server. To make the waiting non-blocking,
    on every loop-pass a "DoEvents" is executed.
    If you would now click on a button (perhaps the
    "Options"-Button), the Dialog would appear. This "event"
    ends just when the Dialog is closed again. And THEN the
    server-loop gets executed again.
    So, the user could block the whole server-communication.
    Therefore, I disabled the buttons, while any
    server-communication takes place.

    Solution: perhaps use some kind of queueing, i.e. instead of
    discarding the clicks, carry them out after the
    communication has stopped.
    This is still no "good" solution, I'd appreciate a better
    way to do it.

     
  • Markus Treinen

    Markus Treinen - 2002-08-14
    • status: open --> open-accepted
     

Log in to post a comment.