VortexGE IPC
The IPC Classes
These are the classes used for IPC in VortexGE :
- CMQServer
- This is the server class.
- For all application intended to use IPC, an instance of this class must exist.
- CMQClient
- This is the client class.
- Each instance of CMQServer can handle as many client as it is defined by
_MAX_MQ_CLIENT_ in the file
"lib/System/InterProcessCommunication.h".
Note that any application that uses VortexGE IPC should
not incorrectly interrupted/aborted (for example: via Ctrl-C) because the shared resource(s)
may not deleted properly and can result in system resource lack. If any of those kind of
applications is happen to be incorrectly interrupted/aborted, always use the provided utility
"util/ipcrem" to remove the left resources (or manually
using "ipcs" and then "ipcrm"
command from console).
The IPC Transaction
IPC transaction is divided into two types :
- Transaction performed by server :
- Response transaction
- Notification transaction
- Transaction performed by client :
- Request transaction
- Custom client to client transaction
Below are tables to explain those transactions :
Client's Requests |
Server's Responses |
Connection |
Connection accepted |
Connection rejected (when the maximum number of allowed client
has been reached) |
Disconnection |
N/A (server just remove the client from its client list) |
Enumerate by UID |
Send a list of clients with the requested UID |
Server's Notification |
Client's Action |
Shut down |
Since the server is about to terminate, client must no longer perform
any IPC transaction with the server or with other clients enumerated from the server
using the "Enumerate by UID" request |
For some examples of how to use the VortexGE IPC, see the topic
"About The Examples".