Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

evmcallback(5) [hpux man page]

EvmCallback(5)							File Formats Manual						    EvmCallback(5)

NAME
EvmCallback() - event management (EVM) callback function SYNOPSIS
DESCRIPTION
An EVM callback function is a function that you provide to allow your program to handle messages arriving on an EVM connection. Most mes- sages are incoming events or responses to requests you have made to the EVM daemon, but you may also get a callback for other reasons. Specify the name (EventCB) of the callback function in the callback parameter when you create an EVM connection with a response mode of callback. Your callback function is invoked by which you must call whenever you detect activity pending on the connection. An EVM callback function must conform to the prototype shown. Callback Function Parameters o The connection parameter contains the connection context pertaining to this callback. This value was returned by when the connection was created. If you have one callback function servicing multiple connections, you might test this to determine which connection a particular invocation is handling. o The callbackArg parameter contains the value you specified as the callbackArg parameter to when you created the connection. For exam- ple, you might use it to hold a pointer to your own context data for the connection. o The callbackData parameter points to a structure containing the details of the callback. The structure includes a callback reason code, an event, and a union containing data specific to each possible reason. The event member may contain NULL if it is not applica- ble to the reason. You may get these reasons: This callback reason indicates that the daemon was unable to deliver one or more events, probably because the client process had not finished processing earlier events, causing the connec- tion buffer to overflow. If necessary, you can use to increase the size of the receive buffer. See the EvmConnControl(3) reference page. This callback reason indicates that an EVM event has been received from the daemon. The event is available in the structure. You must use to free the event when you have finished with it. See the EvmEventDestroy(3) reference page. This callback reason indicates that a prior call has completed, usually with a response from the daemon if the responseMode was specified as when the connection was cre- ated. The posting status is available in the structure. This callback reason indicates that a requested template has been delivered in response to an request. You must use to free the template when you have finished with it. This callback reason indicates that a prior call has completed, usually with a response from the daemon. This callback reason indicates that event template information has been delivered in response to an request. The template is available in the structure. You must use to free the template when you have finished with it. FILES
Header file that contains the event declaration, structures, and prototype for the callback function SEE ALSO
Routines EvmConnCheck(3), EvmConnCreate(3), EvmConnSubscribe(3), EvmEventPost(3). Event Management EVM(5). Event Connection EvmConnection(5). EVM Events EvmEvent(5). EvmCallback(5)

Check Out this Related Man Page

EvmConnCheck(3) 					     Library Functions Manual						   EvmConnCheck(3)

NAME
EvmConnCheck(), EvmConnWait(), EvmConnDispatch(), EvmConnFlush() - maintain connection with the EVM daemon SYNOPSIS
Library EVM Support Library Parameters connection The EVM connection that is to be monitored. See the EvmConnCreate(3) manpage. IOWaiting This is the return operand. Possible values for this operand are the following: There is no outstanding I/O activity on the connection. There is outstanding I/O activity on the connection. The client needs to call to handle the outstanding activity. timeout If the timeout value is NULL, it specifies that is to wait until there is activity on the connection. If the timeout value is not NULL, it specifies the amount of time that waits for activity on the connection. count Receives a count of messages queued for sending to the EVM daemon. DESCRIPTION
The routine checks whether there is any I/O activity outstanding on the connection. If there is activity, IOWaiting is set to The program is to then call to handle it. If there is no outstanding I/O activity, IOWaiting is set to An response from this function does not guaran- tee that an event has arrived. An response simply means that there is a message on the connection that needs to be handled. The routine blocks until activity is detected on the connection. If timeout is not NULL, it specifies the amount of time that the function waits for activity on the connection before returning with a status of The routine handles one incoming I/O message on the connection, calling the client's callback function as needed. If there is no message awaiting processing, the function returns immediately. Calling this function is not guaranteed to invoke the connection's callback func- tion. If the callback is invoked, it is not necessarily true that an event has arrived. The routine attempts to send to the EVM daemon any messages that are queued for output as a result of earlier calls on a connection that is marked as a non-blocking connection. The routine continues to send messages from the queue, until either all messages have been sent or until the send buffer is full. On return, if the count output parameter is a number greater than zero, then that number is the number of messages still queued for sending. returns See EvmConnControl(3) for more information. RETURN VALUE
The operation completed without error. One of the arguments to the function is invalid. A value in a structure member is invalid. An operation failed because an attempt to acquire heap memory failed. A read error occurred while reading from the EVM daemon connection. A write error occurred while writing to the EVM daemon connection. An error occurred on the EVM connection. Invoke to destroy the connection. A timeout period expired. The current operation was interrupted by receipt of a signal. One or more messages is queued for sending to the EVM daemon. ERRORS
The value of is not set. FILES
Default pathname for the domain socket. SEE ALSO
Functions connect(2), select(2), socket(2). Routines EvmConnControl(3), EvmConnCreate(3), EvmConnDestroy(3), EvmEventPost(3). Event Management EVM(5). Event Callback EvmCallback(5). Event Connection EvmConnection(5). EVM Events EvmEvent(5). EvmConnCheck(3)
Man Page