ph_rfd(3)

NAME
ph_rfd, ph_wfd - return file descriptors associated with a PH handle

SYNOPSIS
#include <phclient.h>

int ph_rfd(PH *ph);
int ph_wfd(PH *ph);

VERSION
This man page documents version 1.2 of libphclient.

DESCRIPTION
The ph_rfd() and ph_wfd() functions allow the application to access the underlying file descriptors used by the PH handle ph to communicate with the PH server. The application can use this information to detect communications problems with the server using poll() or select().

RETURN VALUES
The ph_rfd() function returns the file descriptor used for reading from the server. The ph_wfd() function returns the file descriptor used for writing to the server.

NOTES
The file descriptors used for reading and writing may be (and usually are) the same. The application must not write to or read from the file descriptors returned by the ph_rfd() and ph_wfd() functions. If it does, the PH handle may be left in an inconsistent state, and all subsequent behavior is undefined.

SEE ALSO
ph_open(3)