fsDisconnect

Drops an FTP client's connect to an FTP server.

Syntax:

fsDisconnect( client-handle )

Parameters:

(s) client-handle: Extender client handle.

Returns:

(i) 1 on success.  

FsDisconnect closes all FTP ports opened when using the client-handle with other extender functions. Unlike fsClientDelete this function does not remove the client-handle from the extender's handle cache. It only closes the FTPS command and data ports. This means that client-handle can be reused in subsequent calls to extender functions as the extender's functions will automatically reestablish a connect to the FTPS server associated with the handle. If you have completely finished using a handle call fsClientDelete on the handle instead of using this function.

Example:
  
  AddExtender('ilcfs44i.dll',0,'ilcfs64i.dll')
  host = 'test.example.com'
  port = 21
  user = 'demo'
  pswd  = 'password'
  
  ; Create a client
  client = fsClientInit(host, port, user, pswd)
  
  ; Perform file and directory tasks as needed...
  
  ; Close the command and data ports
  fsDisconnect(client)
  
  ; Perform other script tasks that do not require
  ; an FTPS connection.
  
  ; Use the client handle to perform more file and 
  ; directory tasks as needed...
  
  ; Disconnect the client and free extender resources
  fsClientDelete(client)
See Also:

fsClientDelete, fsClientInit