Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Syntax [Table of Contents] Return values

Open Client Client-Library/C Reference Manual

[-] Chapter 3 Routines
[-] ct_poll
[-] Parameters

Parameters

context

A pointer to a CS_CONTEXT structure.

Either context or connection must be NULL. If context is NULL, ct_poll checks only a single connection.

connection

A pointer to a CS_CONNECTION structure. A CS_CONNECTION structure contains information about a particular client/server connection.

Either context or connection must be NULL. If connection is NULL, ct_poll checks all open connections within the context.

milliseconds

The length of time, in milliseconds, to wait for pending operations to complete.

If milliseconds is 0, ct_poll returns immediately. To check for operation completions without blocking, pass milliseconds as 0.

If milliseconds is CS_NO_LIMIT, ct_poll does not return until any of the following is true:

compconn

The address of a pointer variable. If connection is NULL, all connections are polled and ct_poll sets *compconn to point to the connection structure owning the first completed operation it finds.

If no operation has completed by the time ct_poll returns, ct_poll sets *compconn to NULL.

If connection is supplied, compconn must be NULL.

compcmd

The address of a pointer variable. ct_poll sets *compcmd to point to the command structure owning the first completed operation it finds. If no operation has completed by the time ct_poll returns, ct_poll sets *compcmd to NULL.

compid

The address of an integer variable. ct_poll sets *compid to one of the following symbolic values to indicate what has completed:

Values for ct_poll *compid parameter

Value of compid

Meaning

BLK_DONE

blk_done has completed.

BLK_INIT

blk_init has completed.

BLK_ROWXFER

blk_rowxfer has completed.

BLK_SENDROW

blk_sendrow has completed.

BLK_SENDTEXT

blk_sendtext has completed.

BLK_TEXTXFER

blk_textxfer has completed

CT_CANCEL

ct_cancel has completed.

CT_CLOSE

ct_close has completed.

CT_CONNECT

ct_connect has completed.

CT_DS_LOOKUP

ct_ds_lookup has completed.

CT_FETCH

ct_fetch has completed.

CT_GET_DATA

ct_get_data has completed.

CT_NOTIFICATION

A notification has been received.

CT_OPTIONS

ct_options has completed.

CT_RECVPASSTHRU

ct_recvpassthru has completed.

CT_RESULTS

ct_results has completed.

CT_SEND

ct_send has completed.

CT_SEND_DATA

ct_send_data has completed.

CT_SENDPASSTHRU

ct_sendpassthru has completed.

A user-defined value. This value must be greater than or equal to CT_USER_FUNC.

A user-defined function has completed.

compstatus

A pointer to a variable of type CS_RETCODE. ct_poll sets *compstatus to indicate the final return code of the completed operation. This value corresponds to the value that would be returned by a synchronous call to the routine under the same conditions. This can be any of the return codes listed for the routine, with the exception of CS_PENDING.


Syntax [Table of Contents] Return values