EIO_addFilter

- a filter to an event I/O connection

SYNOPSIS

#include <$OV_HEADER/ecs/EIO/EIO.h>

int32 EIO_addFilter
(
	EIO_ConnectionId id,
	const char *encoding_type,
	const char *event_syntax
);

DESCRIPTION

This function is used to filter events received on an event I/O connection. Filters only affect the reception of events from a connection, not the encoding type or syntax of events that can be sent to the connection. If an event arrives on an event I/O connection that does not match the filter parameters, it will be passed to the default receive function, registered with EIO_registerReceiveFn. If a default receive function is not registered, the event is discarded.

Only one filter can be installed on each event I/O connection. No events are received from the event I/O connection until a filter has been installed.

Parameters

EIO_ConnectionId id
The event I/O connection ID for an open connection, as set by EIO_open.
const char *encoding_type
A string describing the encoding type of events to receive. A NULL pointer passed for encoding_type specifies that events of all types are to be received and the event_syntax parameter ignored.
const char *event_syntax
A string describing the event syntax of events to receive. A NULL pointer passed for event_syntax specifies that events of all syntaxes within the encoding type are to be received.

RETURNS

ECS_SUCCESS
Succeeded.
EIO_NOT_INITIALISED
EIO_stackInit has not been called.
EIO_BAD_CONNECTION
The specified event I/O connection is not open.
ESOK_NOT_OPEN
The socket stack has not been initialized.