I'm trying to convert a program from using blocking sockets to non-blocking 
sockets and have modeled my program closely after the sample in Greg Winton's 
Palm OS Network Programming book.  I can succeed in putting the socket into 
non-blocking mode using the NetLibSocketOptionSet immediately after doing a 
NetLibSocketOpen. I then do a NetLibSocketConnect and of course I get a 
netErrWouldBlock as an error return.  I go away for a while (I've tried 
everything from a sys timer tick to several seconds) and attempt to do the 
NetLibSocketConnect again.  On the Garnet and Treo simulators and PalmOS 
emulator, I always get errNone from the socket connect and everything works 
just dandy.  However on a real Treo phone (connected to the Cingular GPRS 
network), I always get a netErrSocketBusy response.  The next dozen or so calls 
to NetLibSocketConnect always return netErrSocketBusy and then the error return 
changes to netErrTooManyTCPConnections and the network just hangs forevermore 
until I paperclip the phone reset button.  What causes a netErrSocketBusy 
response?  No amount of waiting seems to make that go away.  After I get into 
the NetErrTooManyTCPConnections mode, can I do anything to clear this other 
than reset the phone?  I've tried closing the sockets and connections but this 
doesn't help.
BTW... everything works just dandy if I don't set the socket into non-blocking 
mode and I NEVER get netErrSocketBusy on a NetLibSocketConnect call.
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to