DCMTK Version 3.6.8
OFFIS DICOM Toolkit
|
a client class for one-directional IPC messaging. More...
Public Member Functions | |
OFIPCMessageQueueClient () | |
default constructor | |
virtual | ~OFIPCMessageQueueClient () |
destructor, will implicitly call closeQueue() if not already called by the user. | |
OFCondition | openQueue (const char *name, Uint32 port) |
open (access) an existing message queue More... | |
OFBool | hasQueue () const |
check if this object manages an open message queue More... | |
OFCondition | closeQueue () |
close the message queue More... | |
void | detachQueue () |
resets this object to default constructed state without closing the message queue. More... | |
OFCondition | sendMessage (const OFString &msg) |
send a message by placing it into the message queue. More... | |
a client class for one-directional IPC messaging.
It enables the user to access an existing IPC message queue and to send messages to that queue.
OFCondition OFIPCMessageQueueClient::closeQueue | ( | ) |
close the message queue
void OFIPCMessageQueueClient::detachQueue | ( | ) |
resets this object to default constructed state without closing the message queue.
This method may be called by forked child processes to make sure that the destructor executed in the child process will not close the message queue for the parent process as well.
OFBool OFIPCMessageQueueClient::hasQueue | ( | ) | const |
check if this object manages an open message queue
OFCondition OFIPCMessageQueueClient::openQueue | ( | const char * | name, |
Uint32 | port | ||
) |
open (access) an existing message queue
a | name for the queue that is known both to the client and the server. Typically the name of the tool using the queue. Must not contain characters that are not permitted in a filename. Should not be longer than 128 bytes. |
a | number that is known both to the client and the server. Usually this will be the port number under which the server process accepts incoming TCP/IP network connection. When used in other contexts, a number larger than 65535 should be used. |
OFCondition OFIPCMessageQueueClient::sendMessage | ( | const OFString & | msg | ) |
send a message by placing it into the message queue.
msg | the message to be sent. Note that there are platform specific limitations to the maximum message size, e.g. 8 kByte per message for Posix message queues on Linux and 4 kByte per message for System V message queues on Linux. In general, messages should be short. |