SPD_Terminate

Purpose

Terminate all connections to event services.

Syntax

#include "spd.h"
 
SPD_errorTP SPD_Terminate(void);

Description

This function terminates all connections to the Event Server, freeing the file descriptors associated with those connections and releasing system resources.

Use this function in clients that intermittently send events to Event Server but are not registered to receive events from Event Server. Since the number of connected clients is limited by available system resources, you should use this function in clients wherever possible.

To reestablish a connection to the Event Server, call a function that sends an event, for example, SPD_SendAlarm. There is no need to call SPD_InitClient again, nor should the client attempt to do so. If the client does, the error SPD_alreadyInitializedCN results.

Return Value

The return value indicates whether an error occurred, as follows:

Return

Indication

SPD_normalCN

no error

SPD_notInitializedCN

SPD_InitClient not called previously