4D v13.2

FTP_SetPassive

Home

 
4D v13.2
FTP_SetPassive

FTP_SetPassive 


 

FTP_SetPassive ( ftpID ; passiveMode ) -> Function result 
Parameter Type   Description
ftpID  Longint in Reference to a FTP login
passiveMode  Integer in 0=Active mode, 1=Passive mode (default mode)
Function result  Integer in Error Code

The FTP_SetPassive command sets the data stream transfer mode between an FTP Server and an FTP Client while executing commands such as FTP_GetDirList, FTP_Send, FTP_Append or FTP_Receive. Data stream transfer mode setting will be applied to these commands once the command FTP_SetPassive has been executed.

Exchanges between a FTP Server and a FTP Client are based upon two streams: the control stream (port 21 by default) and the data stream (port 20 by default). Usually, FTP Servers are defined as "active" since they open and manage the data connection.
For historical reasons, 4D Internet Commands default data stream transfer mode consists of asking the FTP Server to work in Passive mode. It means that prior to each exchange on the data stream, the FTP command "PASV" is sent.
However, some FTP Servers do not support the passive mode, and also firewalls may not allow it. In these cases, you will need to set the active mode as the current data stream transfer mode.

Note: You may need to check with the network administrator whether the active or the passive mode is used for FTP exchanges.

ftp_ID is the long integer reference to the FTP session established with FTP_Login.

The passiveMode parameter value specifies the data stream transfer mode:

  • a value of 0 will specify the FTP Server to work in Active mode
  • a value of 1 will specify the FTP Server to work in Passive mode (default value).

 
PROPERTIES 

Product: 4D
Theme: IC File Transfer
Number: 88894

 
INDEX

Alphabetical list of commands

 
HISTORY 

Modified: 4D Internet Commands 6.5.3

 
SEE ALSO 

FTP_GetPassive

 
TAGS 

PASV***