Abstract base class for UNIX FIFOs. More...
#include <FIFO.h>


Public Member Functions | |
| int | open (const ACE_TCHAR *rendezvous, int flags, mode_t perms, LPSECURITY_ATTRIBUTES sa=0) |
| int | close (void) |
| Close down the ACE_FIFO without removing the rendezvous point. | |
| int | remove (void) |
| int | get_local_addr (const ACE_TCHAR *&rendezvous) const |
| Return the local address of this endpoint. | |
| void | dump (void) const |
| Dump the state of an object. | |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. | |
Protected Member Functions | |
| ACE_FIFO (void) | |
| Default constructor. | |
| ACE_FIFO (const ACE_TCHAR *rendezvous, int flags, mode_t perms, LPSECURITY_ATTRIBUTES sa=0) | |
Private Attributes | |
| ACE_TCHAR | rendezvous_ [MAXPATHLEN+1] |
| Rendezvous point in the file system. | |
Abstract base class for UNIX FIFOs.
UNIX FIFOs are also known Named Pipes, which are totally unrelated to Win32 Named Pipes. If you want to use a local IPC mechanism that will be portable to both UNIX and Win32, take a look at the <ACE_SPIPE_*> classes.
Definition at line 39 of file FIFO.h.
| ACE_FIFO::ACE_FIFO | ( | void | ) | [protected] |
| ACE_FIFO::ACE_FIFO | ( | const ACE_TCHAR * | rendezvous, | |
| int | flags, | |||
| mode_t | perms, | |||
| LPSECURITY_ATTRIBUTES | sa = 0 | |||
| ) | [protected] |
| int ACE_FIFO::close | ( | void | ) |
Close down the ACE_FIFO without removing the rendezvous point.
Reimplemented in ACE_FIFO_Recv.
Definition at line 65 of file FIFO.cpp.
{
ACE_TRACE ("ACE_FIFO::close");
int result = 0;
if (this->get_handle () != ACE_INVALID_HANDLE)
{
result = ACE_OS::close (this->get_handle ());
this->set_handle (ACE_INVALID_HANDLE);
}
return result;
}
| void ACE_FIFO::dump | ( | void | ) | const |
Dump the state of an object.
Reimplemented from ACE_IPC_SAP.
Reimplemented in ACE_FIFO_Recv, ACE_FIFO_Recv_Msg, ACE_FIFO_Send, and ACE_FIFO_Send_Msg.
Definition at line 22 of file FIFO.cpp.
{
#if defined (ACE_HAS_DUMP)
ACE_TRACE ("ACE_FIFO::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("rendezvous_ = %s"), this->rendezvous_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}
| int ACE_FIFO::get_local_addr | ( | const ACE_TCHAR *& | rendezvous | ) | const [inline] |
Return the local address of this endpoint.
Definition at line 10 of file FIFO.inl.
{
ACE_TRACE ("ACE_FIFO::get_local_addr");
r = this->rendezvous_;
return 0;
}
| int ACE_FIFO::open | ( | const ACE_TCHAR * | rendezvous, | |
| int | flags, | |||
| mode_t | perms, | |||
| LPSECURITY_ATTRIBUTES | sa = 0 | |||
| ) |
Open up the named pipe on the <rendezvous> in accordance with the flags.
Reimplemented in ACE_FIFO_Send, and ACE_FIFO_Send_Msg.
Definition at line 34 of file FIFO.cpp.
{
ACE_TRACE ("ACE_FIFO::open");
ACE_OS::strsncpy (this->rendezvous_, r, MAXPATHLEN);
if ((flags & O_CREAT) != 0
&& ACE_OS::mkfifo (this->rendezvous_, perms) == -1
&& !(errno == EEXIST))
return -1;
this->set_handle (ACE_OS::open (this->rendezvous_, flags, 0, sa));
return this->get_handle () == ACE_INVALID_HANDLE ? -1 : 0;
}
| int ACE_FIFO::remove | ( | void | ) | [inline] |
Close down the ACE_FIFO and remove the rendezvous point from the file system.
Definition at line 18 of file FIFO.inl.
{
ACE_TRACE ("ACE_FIFO::remove");
int const result = this->close ();
return ACE_OS::unlink (this->rendezvous_) == -1 || result == -1 ? -1 : 0;
}
Declare the dynamic allocation hooks.
Reimplemented from ACE_IPC_SAP.
Reimplemented in ACE_FIFO_Recv, ACE_FIFO_Recv_Msg, ACE_FIFO_Send, and ACE_FIFO_Send_Msg.
ACE_TCHAR ACE_FIFO::rendezvous_[MAXPATHLEN+1] [private] |
1.7.0