[Gambas-user] Problems working with FTPClient

Tobias Boege taboege at ...626...
Sat Feb 16 21:47:59 CET 2013


On Sat, 16 Feb 2013, Tobias Boege wrote:
> On Sat, 16 Feb 2013, Beno?t Minisini wrote:
> > Le 16/02/2013 20:33, Tobias Boege a ?crit :
> > >> libcurl uses passive mode by default apparently.
> > >>
> > >> And you must not use sockets to deal with FtpClient. FtpClient is the
> > >> object you have to read in asynchronous mode.
> > >
> > > OK. I see the transfer delay in my application when using Exec(["LIST"]).
> > > The data seems to get to through to curl. But as a matter of fact, there is
> > > no way to access this data using FtpClient.
> > >
> > > It seems to be pretty straightforward to add my bPassive argument. Shall I
> > > try?
> > >
> > > Regards,
> > > Tobi
> > >
> > 
> > Do you use FtpClient in synchronous or asynchronous mode?
> > 
> 
> It doesn't work with either mode.
> 
> > Don't FtpClient raise its Read event when running the command?
> 
> True. AFAICS, it is only raised when Get() is executed without an argument
> and operates asynchronously?
> 
> I attached a sample project showing the PWD and LIST commands. The former
> doesn't need passive mode, the latter does. However, I couldn't get either
> one to do any output.
> 
> Additionally, FtpClient.Get() can be executed without argument and
> asynchronously - nothing happens here. The application seems to hang.
> 
> Regards,
> Tobi

Ahh! I must not use "Line Input #Last, sLine" but
"Read #Last, sFile, Lof(Last)" to make the Read event trigger for
FtpClient.Get(). I hope you can tell me why.

The problem persists, however, with the calls to Exec(). There's no way to
read their data.

Regards,
Tobi




More information about the User mailing list