On Wednesday 02 June 2004 06:33 pm, Petr Stetina wrote:
Thanks, it works fine but in order to make app working I have added SysTaskDelay next to last NetLibSend:
SysTaskDelay (SysTicksPerSecond ());
if (NetLibSocketShutdown (netLib, dataSocket, netSocketDirBoth, -1, &err) != 0) printf ("Cannot shut connection down.\n");
if (ExNetLibSocketClose (netLib, dataSocket, -1, &err) != 0) printf ("Cannot close data connection.\n"); else printf ("Data connection closed.\n");
Additional delay causes significant degradation of transfer rate. Is there another way how to solve this issue? I also try to reduce number of ticks delayed but with lower number of ticks connection lost portion of data sent to server.
What is the SysTaskDelay() for? What happens when you don't use it.. does the socket shutdown before data arrives at the other end or something?
Yes - without SysTaskDelay () following NetLibSocketShutdown () causes probably premature closing of socket and transmited data are lost even if last NetLibSend () did not return any error.
Petr
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
