DragonFly On-Line Manual Pages

Search: Section:  


ftp_type(3)                     C Library Calls                    ftp_type(3)

NAME

ftp_type - set data type for FTP file transfers

SYNOPSIS

#include <libfget.h> int ftp_type(FTP *ftp, char *type);

VERSION

This man page documents version 1.3 of libfget.

DESCRIPTION

The ftp_type() function sets the data transformation type to type. For convenience, macros are provided for the most common types: FTP_TYPE_ASCII ("A") Transfer data in ASCII mode. FTP_TYPE_BINARY ("I") Transfer data in binary (also called "image") mode. This is the default.

RETURN VALUE

The ftp_type() function returns 0 on success, or -1 on error (and sets errno).

ERRORS

The ftp_type() function fails if: ECONNRESET The server shut down the connection. The caller is then responsible for calling ftp_quit() with the FTP_QUIT_FAST flag set. ETIMEDOUT The operation timed out. (The timeout interval can be set via the FTP_OPT_IO_TIMEOUT option; see the ftp_set_options(3) man page for details.) EINVAL Unexpected response code received from server. EAGAIN An attempt was made to send a request to the server while the data connection is open. It may also fail for any of the errors specified for the underlying poll(2), read(2) or write(2) system calls.

SEE ALSO

libfget(3) Feep Networks January 2004 ftp_type(3)

Search: Section: