Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptappsetfdmode.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptappsetfdmode.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptappsetfdmode.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptappsetfdmode.html on line 8

PtAppSetFdMode()

Change the mode that's of interest to an FD handler

Synopsis:

int PtAppSetFdMode( PtAppContext_t app,
                    int fd,
                    unsigned mode );

Library:

ph

Description:

This function changes the mode that's of interest to the handler for the given file descriptor, fd. You'll use an FD function when using pipes in a Photon application.

The app argument is the address of the application context, a structure that manages all the data associated with this application. This must be specified as NULL, so that the default context is used.

The mode argument defines what kind of conditions the application is interested in:

Pt_FD_READ
Data available for reading.
Pt_FD_WRITE
Buffer space available for writing.
Pt_FD_OBAND
Out-of-band data available.

These values correspond to conditions defined for the ionotify() or select() functions. You can OR the values together.

Returns:

0
Success.
-1
An error occurred; errno is set.

Errors:

EINVAL
The fd or mode argument is invalid.
ESRCH
There's no handler registered for the file descriptor.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtAppAddFd(), PtAppAddFdPri(), PtAppRemoveFd()

Other I/O mechanisms in the Interprocess Communication chapter of the Photon Programmer's Guide


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptappsetfdmode.html on line 157

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptappsetfdmode.html on line 157