rapi_getfd()--Get descriptor to wait on


  Syntax
 #include <rapi.h>
 int rapi_getfd( rapi_sid_t SessID)  


  Service program name: QSYS/QTOQRAPI

  Default public authority: *EXCLUDE

  Threadsafe: Yes

The rapi_getfd() API returns the file descriptor associated with a successful rapi_session() call. This descriptor is valid until rapi_release() has been called. When a read event is signaled on this file descriptor, the application should userapi_dispatch() to call the RAPI message-handling routine to handle the event.


Parameters

SessID
(Input) Required
The session ID returned by a successful rapi_session() call.

Authorities

None.


Return Value

Returns a valid file descriptor if the SessID is valid.

Returns -1 if the SessID is not valid.


Error Conditions

None.


Usage Notes

The returned file descriptor can be used to wait on a select() or poll() call; it also can be used to wait on a select() call for a response from an API request. When the response is received, the rapi_dispatch() API can be used to call the RAPI message-handling routine defined in the rapi_session() call.


Related Information

For a description of the RSVP protocol, see RFC 2205 on the RFC PagesLink outside information center.

Complete documentation of the RAPI APIs can be found at The Open GroupLink outside information center.



API introduced: V5R1

[ Back to top | UNIX-Type APIs | APIs by category ]