CLlmClient::Disconnect Method  
 
INT Disconnect();

The Disconnect method closes the connection and releases the memory allocated for the client session.

Parameters

None.

Return Value

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

Remarks

The Disconnect method closes the active connection and releases all memory and resources associated with the specified client session, including the conversation history, cached message and response data, provider information and any other state maintained by the class instance. To preserve information from the session, retrieve it before calling this method.

Avoid calling this method while a blocking request is in progress. If a request must be canceled, call the Cancel method first and wait for the blocking operation to return before disconnecting the client session. The IsBlocking method can tell you if the class is in the middle of processing a blocking operation, such as retrieving the response to a message prompt.

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