Luciano A. Stertz wrote:


Hi,

I'm trying to create a ftp client program, but I'm facing the (in)famous problem of too many open sockets.
As to each FTP data transfer a socket is opened, after 15 transfers the socket 'slot' is full.
I understand the lingering issue, and disabling Linger indeed solves partially the problem. No more errors about too many connection is reported, but another problem arises. Sometimes the socket is closed before all data is received by the other side of the connection, exactly the reason Linger exists, I guess.
So, how can I solve this problem? Is there a way to discover if all data was received (I'm doing only STORs) by the FTP server?
Please, I'm really in a hurry to solve this, and any help will be greatly appreciated.


    Thanks in advance,
    Luciano

PS.: just an idea I had right now but couldn't test yet. What if I first close the socket, wait for the server's reply and only then turn linger off? Would that work out?


Seems I managed to solve the problem enabling netSocketOptTCPNoDelay. The error doesn't reproduce anymore.

   Luciano


-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to