CA_Ping_CHP_Link()

Purpose

Sends an echo request to a channel process.

Libraries

Blueworx Voice Response library (libvae.a)

Custom Server library (libca.a)

Syntax

#include "CA_header.h"
int CA_Ping_CHP_Link (
 short  link_id,
 int    timeout,
 int    wait_flag
);

Description

This subroutine checks the status of a linked channel process and sets the maximum time that the channel process will remain idle before automatically closing the link. Idle time is the time between executing the last request and the receipt of a new request. The range of acceptable values is MIN_PING_TIMEOUT to MAX_PING_TIMEOUT. Any value outside the valid range will be adjusted to the corresponding end point. The default timeout is one minute. The wait_flag allows the custom server to either wait for the response from the execution of the CA_Ping_CHP_Link() subroutine or to continue asynchronously.

Parameters

link_id
The ID of the channel process.
timeout
The amount of time that the channel process will remain idle before automatically closing the link between itself and the custom server. The value is specified in minutes.
wait_flag
A flag that indicates whether or not to wait for a response from the corresponding channel process. Valid values for this parameter are CA_WAIT and CA_NOWAIT. Using the CA_WAIT flag will cause the subroutine to wait up to MAX_PING_TIMEOUT.

Return codes

0
Successful
-1
Unsuccessful (global error number CA_errno is set to indicate the error)

Error names

CA_ACCESS_NOBUFS
CA_INV_LINK_ID
CA_LINK_NOT_OPEN
CA_NO_MSG_RECV
CA_NOT_INIT
CA_REQ_FAILED
CA_TERMINATING

Related information

CA_Open_CHP_Link(), CA_Close_CHP_Link(), CA_Execute_State_Table().