DragonFly On-Line Manual Pages

Search: Section:  


ftp_open(3)                     C Library Calls                    ftp_open(3)

NAME

ftp_write - write to a file on an FTP server

SYNOPSIS

#include <libfget.h> ssize_t ftp_write(FTPFILE *ftpfile, char *buf, size_t bufsize);

VERSION

This man page documents version 1.3 of libfget.

DESCRIPTION

The ftp_write() function writes bufsize bytes to the file associated with ftpfile from the buffer pointed to by buf.

RETURN VALUE

The ftp_write() function returns the number of characters written on success, or -1 on error (and sets errno).

ERRORS

The ftp_write() 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. EBADF ftpfile was not opened for writing. It may also fail for any of the errors specified for the underlying poll(2) or write(2) system calls.

NOTES

It is recommended that applications using ftp_write() should ignore the SIGPIPE signal.

SEE ALSO

libfget(3), ftp_open(3), write(2) Feep Networks January 2004 ftp_open(3)

Search: Section: