cwbCO_SetConnectTimeout

Purpose

This function sets, for the specified system object, the number of seconds iSeries™ Access for Windows® will wait before giving up on a connection attempt and returning an error.

Syntax

 
UINT CWB_ENTRY cwbCO_SetConnectTimeout(
                             cwbCO_SysHandle            system,
                             ULONG                      timeout );

Parameters

cwbCO_SysHandle system - input
Handle returned previously from cwbCO_CreateSystem or cwbCO_CreateSystemLike. It identifies the iSeries system.
ULONG timeout - input
Specifies the connection timeout value, in seconds. The value must be from CWBCO_CONNECT_TIMEOUT_MIN to CWBCO_CONNECT_TIMEOUT_MAX, or if no timeout is desired, use CWBCO_CONNECT_TIMEOUT_NONE. If the value is below the minimum, then CWBCO_CONNECT_TIMEOUT_MIN will be used; if it is above the maximum, CWBCO_CONNECT_TIMEOUT_MAX will be used.

Return Codes

The following list shows common return values.

CWB_OK
Successful completion.
CWB_INVALID_API_HANDLE
Invalid system handle.

Usage

If no timeout value has been suggested by policy, and none has been explicitly set using this API, the connect timeout used is CWBCO_CONNECT_TIMEOUT_DEFAULT.