Home |
Function ftpcli_connect |
Function ftpcli_connectEstablish a connection to an FTP server. int ftpcli_connect(struct ftpcli * cc, DWORD host, char * username, char * password); ParametersccPointer to a session context. An application should set this structure to 0 with memset() before calling ftpcli_connect(). hostIP address of FTP server to connect to. usernameUser name for logging into the FTP server. passwordPassword for logging into the FTP server. return valuePossible return values for this function are:
ftpcli_connect establishes an FTP control socket connection with the remote host and logs in using the user name and password. If the host server does not request the user name or password, they are not sent. If the routine succeeds, the client context is initialized and ready to be passed to other routines in the library. ftpcli_connect allocates a TCP socket to be used to connect and send commands to the server. The socket is closed by ftpcli_quit.
|