evmconncheck.3 (2010 09)

e
EvmConnCheck(3) EvmConnCheck(3)
NAME
EvmConnCheck(), EvmConnWait(), EvmConnDispatch(), EvmConnFlush() - maintain connection with the
EVM daemon
SYNOPSIS
#include <sys/time.h>
#include <evm/evm.h>
EvmStatus_t EvmConnCheck (
EvmConnection_t
connection
EvmBoolean_t *IOWaiting
);
EvmStatus_t EvmConnWait (
EvmConnection_t
connection ,
const struct timeval *timeout );
EvmStatus_t EvmConnDispatch (
EvmConnection_t
connection );
EvmStatus_t EvmConnFlush (
EvmConnection_t
connection ,
EvmInt32_t *count );
Library
EVM Support Library (libevm.so).
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:
EvmFALSE There is no outstanding I/O activity on the connection.
EvmTRUE There is outstanding I/O activity on the connection. The client needs to call
EvmConnDispatch()
to handle the outstanding activity.
timeout If the timeout value is NULL, it specifies that
EvmConnWait()
is to wait until there is
activity on the connection. If the timeout value is not NULL, it specifies the amount of time
that
EvmConnWait() waits for activity on the connection.
count Receives a count of messages queued for sending to the EVM daemon.
DESCRIPTION
The
EvmConnCheck() routine checks whether there is any I/O activity outstanding on the connection.
If there is activity, IOWaiting is set to
EvmTRUE. The program is to then call EvmConnDispatch() to
handle it. If there is no outstanding I/O activity, IOWaiting is set to
EvmFALSE.AnEvmTRUE response
from this function does not guarantee that an event has arrived. An
EvmTRUE response simply means
that there is a message on the connection that needs to be handled.
The
EvmConnWait() 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 return-
ing with a status of EvmERROR_TIMEOUT.
The
EvmConnDispatch() 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 function. If the
callback is invoked, it is not necessarily true that an event has arrived.
The
EvmConnFlush() routine attempts to send to the EVM daemon any messages that are queued for
output as a result of earlier EvmEventPost() 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. EvmConnFlush returns
EvmERROR_QUEUED. See EvmConnControl(3) for more information.
RETURN VALUE
EvmERROR_NONE The operation completed without error.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)