CLlmClient::Cancel Method  
 
BOOL Cancel();

The Cancel method cancels the current blocking request.

Parameters

None.

Return Value

If the method succeeds, the return value is non-zero. If the method fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The Cancel method cancels the current blocking request by closing the active HTTP connection associated with the client session. This causes the blocking operation to fail and return control to the calling thread. The last error code for the blocking function will be set to indicate the operation was canceled.

This method cancels the request locally. It does not guarantee that the provider will stop processing a request that has already been received. The provider may still complete the request and may charge for any processing or tokens used before the connection was closed.

Canceling a request does not delete the client session or clear the conversation history. The client handle remains valid, and a new HTTP connection will be established automatically if it is needed for a subsequent request.

If no blocking request is currently in progress, this method succeeds and has no effect.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: csllmv12.lib

See Also