[Gambas-user] Problems working with FTPClient

Benoît Minisini gambas at ...1...
Sat Feb 16 20:00:17 CET 2013


Le 16/02/2013 19:16, Tobias Boege a écrit :
> Hi,
>
> I have huge trouble working with the FTPClient.Exec() method (sanely) when
> it comes to data transfer.
>
> My goal is to get the directory contents of the root directory, for example.
> This is accomplished using the LIST command which is not implemented in
> FTPClient, so one must use Exec(). The problem is that this command needs a
> passive mode data channel...
>
> AFAICS, this _cannot_ be done with FTPClient alone as there is no way to
> tell it to open up a new socket to read from the server's passive socket and
> raise the Read event (or a PassiveRead event to keep the point of the
> passive connection).
>
> There should, IMHO, at least be something like a bPassive argument to
> FTPClient.Exec() or so to make the FTPClient aware of the fact that we want
> to get data in passive mode. I don't know how hard this could be with curl
> but there must be something like that already in the Get() method...
>
> I experimented a good hour with two plain sockets but didn't come to a
> satisfying result. Or am I totally blind and don't see the right way? Has
> anyone had experience with something like that already?
>
> Of course, there is still the "ftp" program which I'm going to use now. I
> just wanted to point this issue out.
>
> Regards,
> Tobi
>

FtpCLient is based on libcurl. So if libcurl allows passive mode, it 
should be easy to add it...

-- 
Benoît Minisini




More information about the User mailing list