Flush

The Flush call (function name cmflus) sends the contents of the local LU's send buffer to the partner LU (and program). If the send buffer is empty, no action takes place.

CM_ENTRY Flush(
  unsigned char FAR *conversation_ID,  
  CM_INT32 FAR *return_code            
);
 

Parameters

conversation_ID
Supplied parameter. Specifies the identifier for the conversation. The value of this parameter was returned by Initialize_Conversation or Accept_Conversation.
return_code
The code returned from this call. The valid return codes are listed below.

Return Codes

cm_ok
Primary return code; the call executed successfully.
cm_operation_not_accepted
Primary return code; a previous operation on this conversation is incomplete.
cm_operation_incomplete
Primary return code; the operation has not completed (processing mode is nonblocking only) and is still in progress. The program can issue Wait_For_Conversation to await the completion of the operation, or Cancel_Conversation to cancel the operation and conversation. If Specify_Windows_Handle has been called, the application should wait for notification by a Windows message and not call Wait_For_Conversation.
cm_program_parameter_check
Primary return code; the value specified by conversation_ID is invalid.
cm_program_state_check
Primary return code; the conversation was not in SEND or SEND_PENDING state when the program issued this call.
cm_product_specific_error
Primary return code; a product-specific error occurred and has been logged in the product's error log.

State Changes

The conversation must be in SEND or SEND_PENDING state.

If the call completes successfully, (return_code is cm_ok), the conversation is in SEND state.

Other return codes result in no state change.

Remarks

Data processed by Send_Data accumulates in the local LU's send buffer until one of the following happens:

The allocation request generated by Allocate and error information generated by Send_Error are also buffered.