ftp_set_sendhook(3)

NAME
ftp_set_sendhook, ftp_set_recvhook - set send and receive hooks for FTP connection

SYNOPSIS
#include <libfget.h>

typedef void (*ftp_hookfunc_t)(char *);

void ftp_set_sendhook(FTP *ftp, ftp_hookfunc_t sendfunc);

void ftp_set_recvhook(FTP *ftp, ftp_hookfunc_t recvfunc);

VERSION
This man page documents version 1.2 of libfget.

DESCRIPTION
The ftp_set_sendhook() and ftp_set_recvhook() functions set the libfget sending and receiving hooks to point to the application-supplied functions sendfunc and recvfunc, respectively.

Once these hooks are set, when each line of data is sent to or received from the FTP server, the sendfunc and recvfunc functions are called with a single argument, which is a pointer to the line which was sent to or received from the server. This is typically used by the application to monitor and debug the communication between the library and the FTP server.

To unset the send and receive hooks, applications can call ftp_set_sendhook() and ftp_set_recvhook() with a second argument of NULL.

SEE ALSO
ftp_connect(3)