Now that I have been able to reformat the code so I could read it ( the post 
messed it up on my PC ) it looks like you are falling into your EvtGetEvent 
processing without checking to see if netFDIsSet(sysFileDescStdIn, 
readFDs)so you get stuck there.

spike


>From: Alan hand <[EMAIL PROTECTED]>
>Reply-To: "Palm Developer Forum" <[EMAIL PROTECTED]>
>To: "Palm Developer Forum" <[EMAIL PROTECTED]>
>Subject: Troubles with NetLibSelect in main event loop
>Date: Mon, 11 Jun 2001 11:43:50 -0700
>
>I am having troubles implementing NetLibSelect in my main event loop in
>order to handle both data from a socket and user input.  The problem I am
>experiencing is that NetLibSelect seems (it's a little hard to tell for 
>sure
>since I can't debug on the emulator) to not set the FD for the socket even
>though data is available.  The first time around everything goes fine, and
>some data is read from the socket.  On the next iteration of the loop, even
>though there is still data left to be read (as the read did not read all
>available data) NetLibSelect says that there is nothing to read.  The app
>then hangs in this state until an event comes along (i.e. a pen tap) and
>then for some strange reason NetLibSelect says that data is available and
>the data is read.  This whole process is repeated over and over again, an
>din order for my program to successfully download a large chunk of data I
>must continually tap the screen!  I can't seem to figure out why this is
>happening, and the fact that I can't use the debugger with NetLibSelect and
>sysFileDescStdIn makes my life that much harder.  Has anyone else run into
>similar problems?  Can anyone find anything wrong in my code?
>
>Thanks in advance,
>Alan
>
>----------------------------
[snip]
>
>                       EvtGetEvent(&event, (!g_bBusy) ? evtWaitForever :
>1);
>                               if (! SysHandleEvent(&event))
>                                       if (! MenuHandleEvent(0, &event,
>&error))
>                                       if (! AppHandleEvent(&event))
>                                               FrmDispatchEvent(&event);
>
>                       } while (event.eType != appStopEvent);
>               }
>       return;
>}
>
>--
>For information on using the Palm Developer Forums, or to unsubscribe, 
>please see http://www.palmos.com/dev/tech/support/forums/

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to