On Tuesday 24 April 2001 13:40, you wrote:
> Has anyone seen an intermittent 'netErrNoMoreSockets' error
> being returned after INetLib has supposedly opened a socket?
>
> I'm calling INetLibSockOpen(), INetLibSockHTTPReqCreate(), and
> INetLibSockHTTPReqSend(), all of which succeed.  Immediately
> after that I get an inetSockStatusChangeEvent where .status is set
> to 'inetStatusNew', and .sockErr is set to 'netErrNoMoreSockets'.
>
> I only see this on a Palm VII; never with the emulator, an Omnisky
> Palm V or a Kyocera SmartPhone.  If I wait 10 seconds or so, the
> problem seems to go away, but then reappears randomly some time later.

Yup, I've run into this myself.  You need to set the SO_LINGER option on the 
sockets you open to 0.  What's happening is that there are only a small 
number of sockets available to the PalmOS (I'm remembering four, but that is 
probably not correct). When a socket is lingering, it is waiting for some 
time to let the connections data drain so that none is dropped on either end.

I any case, search the archives for LINGER and you should find the code to 
fix this. I worked around it another way before someone last summer/fall 
popsted the solution.

Chris

-- 
[EMAIL PROTECTED]
Author of Trek 2.2 for the Palm Pilot

-- 
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