Currently, lrmd_send_command() with expect_reply set to TRUE, and lrmd_handshake(), call lrmd_send_xml() with a non-NULL reply. That causes it to call crm_ipc_send() or lrmd_tls_send_recv() with a blocking timeout.
We want the commands to be asynchronous for internal callers, so they get a callback when the reply is received (or after the timeout).
lrmd_send_command() is currently used by most of the lrmd_t methods. The interfaces will need to be left as-is since they are public. If possible, we can set some lrmd_t flag for internal connections and use async when that's set, otherwise we may need a duplicate set of async methods (which can be regular internal functions rather than part of lrmd_api_operations_t).
See also: