there might be an easy solution to this but I can't seem to find it.
As I am playing around with incorporating support for the FTP protocol, I find that often I end up in the following situation.
I send a command like USER using Steve Lumos' (I believe) extensions. For example:
_tpsends(disc, "USER %s\r\n", tp->usr.user);
to get the response I have to do the following:
bytes_transferred = disc->readlnf(buf, sizeof(buf), disc);
This works great if the whole output is contained within one line. Testing out some ftp servers I found that they often return extraneous, informative output. For example:
331 Username ok, need password 331 some extra stuff here 331 and more stuff here
My question is this; How can I use the readlnf to deplete the output without running into an infinite loop. It seems like if I call readlnf one extra time then there is nothing to receive and execution hangs. I hope this makes sense. Of course I don't think I can rely on the status codes being the same all the time either.
Kosta Tachtevrenidis
PS Apologies if the solution is elementary in nature.
------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Unicon-group mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/unicon-group
