#include <ipcplus.h>
Public Methods | |
| Msg () | |
| Default constructor, creates a private IPC message queue. | |
| Msg (const unsigned int key, const bool createIfNotExist=true) | |
| Constructor, creates a non-private IPC message queue. More... | |
| virtual | ~Msg () |
| Destructor. | |
| bool | Snd () |
| Send the current message. More... | |
| bool | Snd (const void *data, const size_t size, const int mType=1) |
| Simple send of a block of data. More... | |
| bool | Snd (const char *string, const int mType=1) |
| Simple send of a C-type string. More... | |
| bool | Rcv (const int mType=0, const int mFlag=0) |
| Receive any message. More... | |
| bool | RcvHigh () |
| Receive a priority message. More... | |
| bool | RcvType (const int mType) |
| Receive a specific type of message. More... | |
| virtual bool | destroy () |
| Destroy the actual IPC queue. More... | |
| unsigned int | numMsg () |
| Return the number of messages in the queue. More... | |
Public Attributes | |
| struct { | |
| long mtype | |
| char mdata [IPCPLUS_MAX_MESSAGE_SIZE] | |
| } | msgbuf |
| The current message. | |
| unsigned int | mSize |
| The current message size. | |
Private Attributes | |
| int | qid |
| The Sys V IPC message queue id. | |
|
||||||||||||
|
Constructor, creates a non-private IPC message queue.
|
|
|
Destroy the actual IPC queue.
|
|
|
Return the number of messages in the queue.
|
|
||||||||||||
|
Receive any message. Blocks until a message is available.
|
|
|
Receive a priority message. The messages in the queue may have different priorities. This method will return the message with a highest priority. Blocks until a message is available.
|
|
|
Receive a specific type of message. The messages in the queue may be qualified to be of different types. This method will return only messages with the indicated message type code.
|
|
||||||||||||
|
Simple send of a C-type string. Places a message in the queue with mSize==strlen(string) + 1 and mdata==string.
|
|
||||||||||||||||
|
Simple send of a block of data. Places a message in the queue with the passed data.
|
|
|
Send the current message. The caller is responsable for having set all the fields correctly.
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001