ESOK_process

- run socket stack processing

SYNOPSIS

#include <$OV_HEADER/ecs/ESOK/sockstack.h>
int32 ESOK_process(int32 mSecs);

DESCRIPTION

This function causes socket stack processing to occur.

The ECS socket stack does not retain control, is not signal driven and does not use threads, so it needs to be given control when PDUs are available. This function must be called by the main loop of an application for any processing to happen within the socket stack and to drive event I/O and annotation I/O with any connected ECS correlation engines.

When any of the file descriptors returned by ESOK_getFdSet are active (see select(2)), calling this function will do the processing necessary within the socket stack and may cause registered call back functions to be called.

ESOK_process may return ESOK_NOTHING_DONE when there is still some data to be processed in the socket stack cache. Call ESOK_stackEmpty to check that all socket stack processing has been completed.

Parameters

int32 mSecs
Number of milliseconds to wait for some activity before returning. May be 0 to return immediately if there is nothing to do (poll) or -1 to wait for ESOK I/O activity (block).

RETURNS

ECS_SUCCESS
Succeeded, did something.
ESOK_NOTHING_DONE
Succeeded, nothing was done.
ESOK_NOT_INITIALISED
ESOK_stackInit has not been called.
ESOK_NOT_OPEN
The specified connection is not open.
ESOK_COMMUNICATION_ERROR
Communications error. This error may be transient and recoverable.

SEE ALSO

ESOK_stackEmpty