Disconnect from remote server, Connect to host, Delete file on remote computer – HP Integrity NonStop H-Series User Manual

Page 104

Advertising
background image

Disconnect From Remote Server

The routine FTPclose disconnects the user from a remote FTP server, but does not exit from FTP.
Thus, the user can connect to another host without invoking FTP again.

#include "ftpexth"
short FTPclose(short hd)

hd

File number.

The return value is -1 if the routine fails, otherwise the routine is successful. The error number is set
accordingly.

Connect to Host

The routines FTPconnect and FTPconnect_nw allow the user to connect to another host after logging
off from the remote host, using FTPclose.

#include "ftpexth"
short FTPconnect(short hd, char *host,
short port, char *user,
char *passwd, char *acct)
short FTPconnect_nw(short hd, char *host,
short port, char *user,
char *passwd, char *acct,
long tag)

hd

File number.

host

name of the remote host.

port

port number to be used. If the port number specified <0, the system will choose its own port
number.

user

user name used to log on.

passwd

password.

acct

account to be used to log on. If acct is set to "", it is considered unspecified.

tag

parameter to be used for the GUARDIAN nowait operation initiated by FTPconnect_nw.

The return value is -1 if the routine fails, otherwise the routine is successful. The error number is set
accordingly.

Delete File on Remote Computer

The routines FTPdelete and FTPdelete_nw delete a file on a remote machine.

#include "ftpexth"
short FTPdelete(short hd, short proxy,
char *filename)
short FTPdelete_nw(short hd, short proxy,
char *filename, long tag)

104 FTP API External Specification

Advertising
This manual is related to the following products: