[twsocket] TFtpClient mode change problem.

Davie smatters@smatters.com
Sat, 17 Jun 2000 14:56:49 -0500


FRANCOIS and others, please read this message as I "believe" there is an error
in the "C" version of the FTPTST program that causes people to "believe" that
they have coded their programs correctly when in fact it's incorrect.

Raptor is just beginning his exploration into creating an FTP program in "C"
and thus he is probably using the ftptst1.c file as reference. And as reference
he probably concluded that the only thing required to do to set the ASCII or
BINARY mode is the set the .binary property. In fact this is incorrect.

He needs to use the TypeBinary method and TypeASCII method. I don't know much
about C or how pascal and C link together, but I am using my years of
experience to come to this conclusion.

Please have a look at the ftptst1.c source that shows how to use the ftptest
program in "C" and you will see that it AND the Delphi versions are the SAME
when it comes to setting the binary mode. I believe that they are BOTH
incorrect.

Please tell me what you think

Look at a snippet from the ftpcli.pas file, it explains it pretty well.

======== snippet start ===============

Quick Reference:

Properties:
  HostName      - FTP server host name or IP address
  UserName      - User name for authentication on FTP server
  PassWord      - Passwor needed for user, can be blank
  HostDirName   - Directory as knwon of FTP server
  HostFileName  - File name as known on FTP server
  LocalFileName - Local file name (complete path)
  Binary        - Select binary or ascii file transfert (Need to call TypeSet
                  or TypeSetAsync to send it to FTP server).
  (There are other less used properties, see code below)

Methods:
  Open       - Open the connection with the FTP server
  User       - Send username
  Pass       - Send password
  Connect    - Open the connection, send username and password
  Quit       - Disconnect gracefully from FTP server
  Abort      - Disconnect (close connection) immediately
  Pwd        - Get current working directory
  Cwd        - Change Working Directory
  CDup       - Change to parent directory
  TypeSet    - Set type for file transfert (see Binary property)
  TypeBinary - Set to binary type transfert and call TypeSet
  TypeAscii  - Set to ascii type transfert and call TypeSet


======== snippet end ===============

Thanks
Davie


Raptor G wrote:

> Hi Everybody,
>
> I am facing a problem with changing mode to ASCII to Binary while connected
> in Ftp client. While connected, (all the authorization is done, ie, OPEN,
> USER, PASS) I say FTP->Binary = true; But it doesn't change it as I monitor
> from Serv-U's spy on user mode. Anything missing?
>
> Any help is appreciated,
>
> Regards,
>
> RaptorG
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
> _______________________________________________
> TWSocket mailing list [http://elists.org/mailman/listinfo/twsocket]
> Visit our website at http://www.rtfm.be/fpiette/indexuk.htm