EIO_open

- This function opens an event I/O connection with a given stream

SYNOPSIS

#include <$OV_HEADER/ecs/EIO/EIO.h> 
int32 EIO_open
(
	ESOK_ConnectionId conId,
	const char *stream_name, 
	EIO_ConnectionId *id
);

DESCRIPTION

This function opens an event I/O connection with a given stream through the specified socket stack connection.

The stream can be specified by name, or 0 can be passed to indicate the default stream. The nominated stream is only used for events received from the engine. Events sent to the engine will enter all streams regardless of the connection stream.

When the event I/O connection has been opened events can be sent to the connection. Events are not received from the connection unless a filter is installed using EIO_addFilter, and a receive function (or default receive function) is specified using EIO_registerReceiveFn.

Multiple event I/O connections can be opened through one or more socket stacks. A new event I/O connection ID is returned from each call of EIO_open. Filters and Receive Functions can be installed independently for each event I/O connection.

A maximum of EIO_MAXCONevent I/O connections (defined inEIO_types.h) can be open simultaneously. If this limit is exceeded an EIO_RESOURCE_LIMITerror will result.

Parameters

ESOK_ConnectionId conId
The socket stack connection ID for a socket stack connection opened with ESOK_open.
const char *stream_name
Name of stream to open connection with.

Specify NULL for default stream. Only applies to events received from the ECS engine.

EIO_ConnectionId *id
Returned event I/O connection ID of the opened event I/O connection.

RETURNS

ECS_SUCCESS
Succeeded.
EIO_NOT_INITIALISED
EIO_stackInit has not been called.
EIO_BAD_CONNECTION
Specified event I/O connection is not open.
EIO_RESOURCE_LIMIT
No more event I/O connections available.
ESOK_RESOURCE_LIMIT
No more socket stack connections available.
ESOK_NOT_OPEN
The socket stack has not been initialized.
ESOK_COMMUNICATION_ERROR
Communications error. This error may be transient and recoverable.