|
Open CASCADE Technology 6.5.2
|
Establishes a mailbox with VMS-like-features and with
asynchronous functions.
The mail boxes are used to communicate asynchronously
between processes.
Basically MailBox facilities provide tools to communicate
between a client process and a server process.
The client process puts data/requests into the mail-box and
the server process gets these data/requests. In this context
client and server must run on the same machine.
Warning: On VMS, you need TMPMBX privilege.
#include <OSD_MailBox.hxx>
Public Member Functions | |
| void * | operator new (size_t, void *anAddress) |
| void * | operator new (size_t size) |
| void | operator delete (void *anAddress) |
| OSD_MailBox () | |
| To be used with 'Open'. It just allocates room for 'myName'. This is for a client process. | |
| OSD_MailBox (const TCollection_AsciiString &name, const Standard_Integer Size, const OSD_Function &Async_function) | |
| Instantiates MailBox object with a name, size required and a function to read mail boxes asynchronously. Each process working with the same MailBox must use a common known access : the mail-box's name. | |
| void | Build () |
| Builds (physically) <me> into system. <me> is created and ready to run. This can be seen as an asynchronous server. | |
| void | Open (const TCollection_AsciiString &name, const Standard_Integer Size) |
| Opens mail box, and is ready to communicate with an already created mailbox. Raises NullObject when the name is a null string. Raises ConstructionError when the name contains characters not in range of ' '...'~'. Raises ProgramError when the mail box has a null size. This can be seen as a client. | |
| void | Delete () |
| Removes the mail box from system. This is used only by server process ! Raises ProgramError when the mail box is already deleted. | |
| void | Write (const TCollection_AsciiString &Message, const Standard_Integer Length) |
| Writes a message of specified length into mail box. <Message> is used as a buffer, not as a common string. So this can be not null terminated like a 'char *'. This is why <Length> is useful. Raises ProgramError when the length of the data is either negative or zero. | |
| Standard_Boolean | Failed () const |
| Returns TRUE if an error occurs | |
| void | Reset () |
| Resets error counter to zero | |
| void | Perror () |
| Raises OSD_Error | |
| Standard_Integer | Error () const |
| Returns error number if 'Failed' is TRUE. | |
| OSD_MailBox::OSD_MailBox | ( | ) |
| OSD_MailBox::OSD_MailBox | ( | const TCollection_AsciiString & | name, |
| const Standard_Integer | Size, | ||
| const OSD_Function & | Async_function | ||
| ) |
| void OSD_MailBox::Build | ( | ) |
| void OSD_MailBox::Delete | ( | ) |
| Standard_Integer OSD_MailBox::Error | ( | ) | const |
| Standard_Boolean OSD_MailBox::Failed | ( | ) | const |
| void OSD_MailBox::Open | ( | const TCollection_AsciiString & | name, |
| const Standard_Integer | Size | ||
| ) |
| void OSD_MailBox::operator delete | ( | void * | anAddress | ) | [inline] |
| void* OSD_MailBox::operator new | ( | size_t | size | ) | [inline] |
| void* OSD_MailBox::operator new | ( | size_t | , |
| void * | anAddress | ||
| ) | [inline] |
| void OSD_MailBox::Perror | ( | ) |
| void OSD_MailBox::Reset | ( | ) |
| void OSD_MailBox::Write | ( | const TCollection_AsciiString & | Message, |
| const Standard_Integer | Length | ||
| ) |
1.7.4