NAME

GRPC_CANCEL - Cancels a session.

SYNOPSIS

INTEGER FUNCTION GRPC_CANCEL(SID)

ARGUMENTS

INTEGER SID
The session ID

DESCRIPTION

The GRPC_CANCEL() function cancels the current session.

GRPC_CANCEL() is a non-blocking function. It does not wait for the completion of the cancellation.

A cancelled session should be taken care by a wait function such as GRPC_WAIT() so that the allocated resources for the session can be released.

Wait functions such as GRPC_WAIT() return GRPC_SESSION_FAILED if those functions detect the cancelled session. GRPC_GET_ERROR(SID) returns GRPC_CANCELED_NP if the cancel was successfully completed. Otherwise, it returns an error.

This function is MT-safe.

RETURN VALUE

If successful, GRPC_NO_ERROR is returned. In the case of an error, Error code is returned.

ERRORS

GRPC_NOT_INITIALIZED
GRPC client is not initialized yet.
GRPC_INVALID_SESSION_ID
Session ID is not valid.
GRPC_OTHER_ERROR_CODE
Internal error detected.

last update : $Date$