Next Topic

Previous Topic

Book Contents

Connect

int Connect(string sUsername,string sPassword,unsigned int iPort=21)

Return values

Non zero if the function is successful; otherwise 0, and a specific error code can be retrieved by calling global function GetLastError.

Parameters

  • sUsername - String containing the username
  • sPassword - String containing the password
  • iPort - Default port 21 (standard FTP port)

Remarks

The function connects to a FTP server using the provided username and password. The port can be changed from the default port 21 if the FTP server is bound on another port.