The C language version of the DLM monitor API is exported by dlmmon.h. Common types and structures are exported by dlmdef.h.
To start a monitor session:
One of the parameters to dlm_MonOpen() is a callback function. Once a monitor session has successfully connected to the server, the callback function supplied by the application will be called for each event that arrives from the server. Events received in the callback must be released back to the monitor module by calling dlm_MonReleaseEvent().
To terminate a monitor session, call dlm_MonDisconnect(). When the session is no longer required:
During a session, the data flow from the server can be stopped by calling dlm_MonStop() and restarted by calling dlm_MonStart(). However, be aware that data is not buffered by the server while a session is stopped.
Monitor-server communication is modeled using the finite state machine shown below.
Transitions may be caused either by calling API functions or by events received from the server. The current state of a monitor session can be determined by calling dlm_MonState(). State codes can be converted to strings by calling dlm_StateMessage().