Hi all,
I have some code that sends a request to an HTTP server, and waits for a
response. I'd like to add a timeout to the response wait, so before reading any
response, I perform a NetLibSelect call:
NetFDSetType none;
NetFDSetType readfds;
Int16 numfds;
netFDZero(&none);
netFDZero(&readfds);
netFDSet(socket, &readfds); // only interested in the socket
numfds = NetLibSelect ( libRefNum, socket+1,
&readfds, &none, &none, timeout, errP);
On the simulator, it works fine -- if the timeout is exceeded, NetLibSelect
returns zero.
However, when I test this on my device (Treo 600), NetLibSelect always waits
the full timeout, and then returns zero if there was no data, or one if there
was data!
Is there anything I'm doing wrong, or is it hopeless?
Thanks,
--Rob
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/