Keith

I understand this mainly from hearsay, and personal experience. In Greg 
Winton, Palm OS Network Programming, O'Reilly, p199, it says "On Windows 
and Max machines, the host's sockets API do not support timeouts, so this 
parameter is ignored." It then goes on to say that POSE appears frozen 
until the call "times out." I asked at PalmSource and nobody seemed to know 
too much about it, except that there used to be a bug that had been fixed.

In my code, I set the timeout to 20 seconds which appears to be the case on 
a real device (I haven't actually set up a scenario that will take forever 
and timed the timeout). With POSE the same code often times out on the host 
stack in what I estimate to be 2 seconds (definitely way less than 20 
seconds), but doesn't seem to do the same using the NetLib stack. I guess 
have never seen it written that there is a two second timeout... and I also 
haven't spent that much time investigating since it didn't seem to be a big 
obstacle.

If you have any ideas as to how I can figure out if I'm doing something 
wrong I'd be pleased to hear it. (I have just upgraded to POSE 3.4)

Code snippets...

#define genNetLibTimeout (sysTicksPerSecond * 20)

:

         AppNetTimeout = genNetLibTimeout;

:

         bytes = read(context->socketRef, c, sizeof(Char));

Matt

PS. Having a bit of trouble with mail server, so if I don't reply, then I 
might not be getting the forum...


At 02:33 PM 15/2/2002 -0800, you wrote:
>At 3:56 PM -0500 2/15/02, Matt Hebley wrote:
> From what I understand, POSE using the host TCP stack has a
>>hardwired 2 second timeout (i.e. it ignores the timeout you specify in 
>>the NetLib call).
>
> From where do you understand this?  Poser does not ignore the timeout 
> values and instead substitute a 2 second timeout.  There's nothing in the 
> documentation, release notes, or source code that says anything about 2 
> second timeouts, so I'm keen to learn where you heard this.
>
>-- Keith Rollin
>-- Palm OS Emulator engineer
>
>--
>For information on using the Palm Developer Forums, or to unsubscribe, 
>please see http://www.palmos.com/dev/tech/support/forums/


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