Two methods of handling messages

An application can handle CS-Library messages in one of two ways:

The callback method has the following advantages:

Inline message handling has the advantage of allowing an application to check for messages at particular times. For example, an application that makes a sequence of calls to establish a connection might wait until the connection-related call sequence is complete before checking for messages.

Most applications use the callback method to handle messages.

An application indicates which method it will use for a particular context either by calling cs_config to install a message callback routine or by calling cs_diag to initialize inline message handling.

An application can switch back and forth between the inline method and the callback method:

If a message callback is not installed and inline message handling is not enabled, CS-Library discards message information.