bps_remove_fd()

Removes a file descriptor from the active channel.

Synopsis:

#include <bps/bps.h>
 
BPS_API int bps_remove_fd(int fd)

Arguments:

fd
The file descriptor to remove.

Library:

libbps

Description:

The function is called when a service wants to remove a file descriptor from the channel's set of file descriptors that it is monitoring for input or output.

If the file descriptor is present it is removed from the channel. The io_handler callback and associated user data are also removed.

Typically, the function is used in services that provide a function to stop events from arriving on the channel's event queue.

Returns:

BPS_SUCCESS if the fd (file descriptor) was successfully removed from the channel, BPS_FAILURE with the errno value set otherwise.