Synchronous message passing is great for dividing tasks into server tasks and client tasks. A server task uses the “receive” function to listen for requests, and client tasks use the “send” function to request services.
while (REXIS_MessageReceive(&sender_id, buf, sizeof (buf)) >= 0)
... // perform task and reply
REXIS_MessageReply(sender_id, replybuf, sizeof (replybuf));
if (REXIS_MessageSend(server_id, sendbuf, sizeof (sendbuf), requestbuf, sizeof (requestbuf)) >= 0)
... // perform task