Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

21.3 FTP Specific

Two different data connection mechanisms are possible using the FTP protocol: active client or passive client. In the case of an active client, a PASV protocol command, which tells the server to be passive, is sent from the client to the server. The FTP server then sends the port number of its process for the client, and the server listens for the client to make a connection.

In the case of a passive client, the client sends the port number of its process to the server. The server sends an acknowledgment upon receiving the information, and the client listens for the server to make a connection.

RWIFtpClient handles these mechanisms by allowing you to specify a port number in methods which initiate data transfer. If you specify a negative number, the correction will be made with the client active, and the port number will be chosen algorithmically. If you specify zero (the default), the connection will be client-passive. If you specify a positive number, it will be used in client-active mode.

The RWIFtpClient execute() method is available to perform a generic protocol command. This method can be useful for accessing non-standard FTP protocol commands on some FTP servers. It is assumed to be an atomic operation (in other words, there is no state change after an execution), and it is available after a successful USER/PASS login sequence.



Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.