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

432 HP-UX C SIP Stack Programmers Guide
Mid-layer Select API
{
RvSipMidTimerHandle hMyTimer = NULL;
if(RV_OK != RvSipMidTimerSet(hMidMgr,
1000,
TellTime,
NULL,
&hMyTimer))
{
HandleError();
}
}
MID-LAYER SELECT
API
Some applications use file descriptors other than the one allocated by the
SIP Stack (for other uses). An application may want to register these file
descriptors on the same select() loop that the SIP Stack uses.
API FUNCTIONS The Mid-layer provides an API for registering file descriptors on the select()
loop (poll and dev/poll are also supported if the operating system supports
them).
RvSipMidSelectCallOn()
Registers a file descriptor on the select() loop. You can register to listen on read
or write events, and provide a callback that will be called when the select() exits
due to activity on that file descriptor.
After registering a file descriptor on the select() loop, the application should let
the SIP Stack process events using one of the following functions:
RvSipStackProcessEvents()—continues the non-stopping
select() loop.
RvSipStackSelect()—performs one iteration of the select()
loop.
RvSipStackSelectUntil()—performs one iteration of the select()
loop with maximal time limitation.
EVENTS The select() exit event is as follows: