:SetPassiveMode()


Class

     aprFTP()

 

Syntax

     :SetPassiveMode(lPassive, [hSession] ) -> lSuccess

 

Parameters

 

lPassive

Logical indicating Passive mode.

 

hSession

Optional: If hSession is not passed, the value in :Session will be used

 

Return

Logical indicating Success.

Returns .T. if the operation succeeds, otherwise returns .F.

To get further error information see :nErr and :cErr

To see the remote server's response, see :GetResultCode() and :GetResultString().

 

Description

The :SetPassiveMode() method enables or disables passive mode file transfers for the specified client session. When the client is not in passive mode, which is the default state, the remote server establishes a connection with the client to transfer data. However, when the client is in passive mode, the client is responsible for establishing the connection. This may be necessary when accessing some servers through a proxy server, or those that are protected behind a firewall.

 

Not all servers support passive mode, in which case an error will be returned to the client when this function is called. Passive mode should only be used when it is actually required by the remote host.

 

See Also

:GetFile(), :OpenFile(), :PutFile()