Sets the thread's active channel.
BPS_API int bps_channel_set_active(int chid)
- A channel ID supplied by a previous call to the bps_channel_create() function.
The active channel for a thread determines which channel subsequent calls affect. Calls to various functions, such as the bps_get_event() , bps_push_event() , bps_add_fd() functions, work on the active channel. In addition, several service functions affect the active channel. Typically, function names that end in _request_events() adds a service's file descriptor to the active channel so that the events will start to enter the active channel's event queue.
A call to the bps_channel_set_active() function is only necessary when the application has created a channel using the bps_channel_create() function. A call to the bps_initialize() function creates a default channel, and that default channel is set as the active channel.
The previous active channel ID, BPS_FAILURE with the errno value set otherwise.