HP-UX C SIP Stack Programmer's Guide (Novembery 2007)

434 HP-UX C SIP Stack Programmers Guide
Mid-layer Select API
Get the bit masks that the SIP Stack will use in the select()
function.
Run the select() function in your own code.
Give the results back to the SIP Stack.
Working in this mode is not recommended as long as the regular Select API that
is described in Mid-layer Select API fits the application needs.
If, however, the application must implement an application-level select() loop, it
should work in a loop of five stages:
1. Get the select() bit mask from the SIP Stack.
2. Add application bits.
3. Call select()/poll().
4. Handle applicative bits.
5. Provide the SIP Stack with select() results.
The following are the functions used for running the select() loop at the
application level.
RvSipMidSelectGetEventsRegistration()
Gets the bit mask that the SIP Stack should provide to the select()/poll() loop.
You should use this bit mask as a parameter when calling your own select()/
poll().
RvSipMidSelectEventsHandling()
Causes the SIP Stack to handle events on circuits opened by SIP Stack sockets
raised by select()/poll().
RvSipMidSelectSetMaxDescs()
Sets the amount of file descriptors that the select() module can handle in a single
select() engine. This is also the value of the highest file descriptor possible. This
function must be called before initialization of the SIP Stack.
RvSipMidSelectGetMaxDesc()
Gets the current value used as the maximum value for a file descriptor by the
select() procedures. You can use this function before calling select() to know the
value to pass as exceptfds.