Sends a message to subscribed modules.
Synopsis.
#include <parabellym/api.h> int para_msg_send(para_msgi_t *info);
Arguments.
Access.
Unrestricted.
Description.
The para_msg_send function delivers data to one or more modules. The data passed with the message is copied to each module's incoming message queue and may be safely changed after this function returns. If the message does not require a response, the function returns immediately.
If the rreq member of the info block is not set, the message is delivered to all subscribed modules. Otherwise the message is only delivered to the first subscribed module and the function blocks until the module processes the message and replies. When the function unblocks, the attc and attv members of the info block describe the data with which the receiving module had replied. (The data is valid until the next call to the library and must be copied to the module's own memory space.)
When a response arrives, members attc and attv described the data with which the remote module replied; this data must not be deallocated by the module.
A module will not receive messages it sends.
Return value.