Re: development question
Tomasz Grobelny <[email protected]>
| Newsgroups | gmane.network.lftp.devel |
|---|---|
| Message-ID | <[email protected]> |
On Friday 04 of February 2005 07:48, Alexander V. Lukyanov wrote: > On Thu, Feb 03, 2005 at 07:22:19PM +0100, Tomasz Grobelny wrote: > > I'm trying to write my own program using lftp internally and I have two > > questions concerning lftp: > > 1. Do you plan to release sth like liblftp? > > There are some libraries internal to lftp, they are not shared and not > installed by default. If there is a need, they can be made shared and > installed. > What about includes? Would it be a problem to have them installed as well? > > 2. How do I get directory listing? For now I managed to parse what Read > > returns after opening connection with LONG_LIST flag. Is the output > > remote server independent? Is is possible to get this data in a > > structure? I noticed fileinfo structure but it lacks at least permission > > info. Is it the way to go or there is no such possibility to get data in > > nice format? > > There is ListInfo class. It is created with FileAccess::MakeListInfo > method, then it does all the work and nice info can be fetched with > GetResult method. You can see some examples in lftp code. > Thanks, for now it more or less works (using Parse, not GetResult). But I have a strange problem: example2.cc as well as my program stall after receiving some data. As I noticed for example2.cc it receives 2271 bytes then waits for 60 seconds and finishes receiving data so that the resulting file contains 2402 bytes. If I increase buffer size to 2048 bytes the program reads all data at once but still stalls for 60 seconds before finishing execution. What may cause the problem? Tomek