evmconncreate.3 (2010 09)
e
EvmConnCreate(3) EvmConnCreate(3)
and then invoke EvmConnDispatch()
to handle the activity. In most cases, the
connection’s callback function is invoked to handle incoming messages.
This response mode must be used for listening connections.
transport Specify the type of connection to be made to the daemon. Because EVM currently sup-
ports only local connection the daemon, this argument must always be set to NULL. If
this argument is not NULL, an error occurs.
callback A pointer to a routine that is to be called by EvmConnDispatch()
to process an incom-
ing message. The routine is declared as described in the EvmCallback (5) manpage. If the
response mode is not
EvmRESPONSE_CALLBACK
, this operand is NULL.
callbackArg This argument is supplied each time the callback routine is invoked by
EvmConnDispatch()
. See EvmCallback (5). The calling process uses this argument to
pass its own context data for the connection to the callback function. If no context data is
required, this operand is NULL.
connection For
EvmConnCreate()
, connection is the return operand for the new connection. For
the other routines described on this manpage, connection is the EVM connection to be pro-
cessed.
fd The return operand for the file number associated with the supplied connection.
DESCRIPTION
The
EvmConnCreate() routine establishes a connection between a client process and the EVM dae-
mon. If the connection is successful, a pointer to a new connection context is returned in the connection
argument.
The
EvmConnCreatePoster()
routine is a macro that establishes a posting connection to the local
daemon. Using this macro is equivalent to calling
EvmConnCreate()
with type set to
EvmCONNECTION_POST
, responseMode set to EvmRESPONSE_WAIT, and transport , callback, and
callbackArg are all set to NULL.
The
EvmConnCreateSubscriber()
routine is a macro that establishes a subscribing connection to
the local daemon. Using this macro is equivalent to calling
EvmConnCreate()
with type set to
EvmCONNECTION_LISTEN
, responseMode set to EvmRESPONSE_CALLBACK, and transport set to
NULL.
The
EvmConnFdGet() routine returns the file number associated with the connection. This file number
can be used by a client application, which handles multiple I/O sources, for use in a call to
select() to
determine when there is activity on the connection. The program must call
EvmConnDispatch()
to
handle the activity. It must not close the file descriptor, nor perform any direct I/O on it.
The
EvmConnDestroy()
routine destroys the connection and frees any resources associated with it.
This routine must be called to destroy the connection.
RETURN VALUE
EvmERROR_NONE The operation completed without error.
EvmERROR_INVALID_ARGUMENT
One of the arguments to the function is invalid.
EvmERROR_INVALID_VALUE A value in a structure member is invalid.
EvmERROR_NO_MEMORY An operation failed because an attempt to acquire heap memory failed.
EvmERROR_READ A read error occurred while reading from the EVM daemon connection.
EvmERROR_WRITE A write error occurred while writing to the EVM daemon connection.
EvmERROR_CONNECT An error occurred while attempting to connect to the EVM daemon.
EvmERROR_SELECT An error occurred on the EVM connection. Invoke EvmConnDes-
troy() to destroy the connection.
EvmERROR_SIGNAL The current operation was interrupted by receipt of a signal.
ERRORS
The value of
errno is not set.
2 Hewlett-Packard Company − 2 − HP-UX 11i Version 3: September 2010