DragonFly On-Line Manual Pages

Search: Section:  


ph_set_sendhook(3)              C Library Calls             ph_set_sendhook(3)

NAME

ph_set_sendhook, ph_set_recvhook - set libphclient debugging hooks

SYNOPSIS

#include <phclient.h> typedef void (*ph_debug_func_t)(void *, char *); void ph_set_sendhook(PH *ph, ph_debug_func_t sendfunc); void ph_set_recvhook(PH *ph, ph_debug_func_t recvfunc); void ph_set_hookdata(PH *ph, void *hook_data);

VERSION

This man page documents version 1.2 of libphclient.

DESCRIPTION

The ph_set_sendhook() and ph_set_recvhook() functions set the libphclient 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 PH server, the sendfunc and recvfunc functions are called with two arguments. The first is a pointer to application-specific data (set by the ph_set_hookdata() function). The second is a pointer to the line that 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 PH server. To unset the send and receive hooks, applications can call ph_set_sendhook() and ph_set_recvhook() with a second argument of NULL.

SEE ALSO

ph_open(3) University of Illinois Oct 2002 ph_set_sendhook(3)

Search: Section: