Receiver side of the bytestream C++ wrapper for UNIX FIFOs. More...
#include <FIFO_Recv.h>


Public Member Functions | |
| ACE_FIFO_Recv (void) | |
| Default constructor. | |
| ACE_FIFO_Recv (const ACE_TCHAR *rendezvous, int flags=O_CREAT|O_RDONLY, mode_t perms=ACE_DEFAULT_FILE_PERMS, int persistent=1, LPSECURITY_ATTRIBUTES sa=0) | |
| Open up a bytestream named pipe for reading. | |
| int | open (const ACE_TCHAR *rendezvous, int flags=O_CREAT|O_RDONLY, mode_t perms=ACE_DEFAULT_FILE_PERMS, int persistent=1, LPSECURITY_ATTRIBUTES sa=0) |
| Open up a bytestream named pipe for reading. | |
| int | close (void) |
| Close down the named pipe. | |
| ssize_t | recv (void *buf, size_t len) |
| Recv buf of up to len bytes. | |
| ssize_t | recv_n (void *buf, size_t len) |
| Recv buf of exactly len bytes (block until done). | |
| void | dump (void) const |
| Dump the state of an object. | |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. | |
Private Attributes | |
| ACE_HANDLE | aux_handle_ |
| Auxiliary handle that is used to implement persistent FIFOs. | |
Receiver side of the bytestream C++ wrapper for UNIX FIFOs.
Definition at line 36 of file FIFO_Recv.h.
| ACE_FIFO_Recv::ACE_FIFO_Recv | ( | void | ) |
Default constructor.
Definition at line 65 of file FIFO_Recv.cpp.
: aux_handle_ (ACE_INVALID_HANDLE) { ACE_TRACE ("ACE_FIFO_Recv::ACE_FIFO_Recv"); }
| ACE_FIFO_Recv::ACE_FIFO_Recv | ( | const ACE_TCHAR * | rendezvous, | |
| int | flags = O_CREAT | O_RDONLY, |
|||
| mode_t | perms = ACE_DEFAULT_FILE_PERMS, |
|||
| int | persistent = 1, |
|||
| LPSECURITY_ATTRIBUTES | sa = 0 | |||
| ) |
Open up a bytestream named pipe for reading.
Definition at line 71 of file FIFO_Recv.cpp.
: aux_handle_ (ACE_INVALID_HANDLE) { ACE_TRACE ("ACE_FIFO_Recv::ACE_FIFO_Recv"); if (this->ACE_FIFO_Recv::open (fifo_name, flags, perms, persistent, sa) == -1) ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_FIFO_Recv"))); }
| int ACE_FIFO_Recv::close | ( | void | ) |
Close down the named pipe.
Reimplemented from ACE_FIFO.
Definition at line 30 of file FIFO_Recv.cpp.
{
ACE_TRACE ("ACE_FIFO_Recv::close");
int result = ACE_FIFO::close ();
if (this->aux_handle_ != ACE_INVALID_HANDLE)
return ACE_OS::close (this->aux_handle_);
else
return result;
}
| void ACE_FIFO_Recv::dump | ( | void | ) | const |
Dump the state of an object.
Reimplemented from ACE_FIFO.
Reimplemented in ACE_FIFO_Recv_Msg.
Definition at line 18 of file FIFO_Recv.cpp.
{
#if defined (ACE_HAS_DUMP)
ACE_TRACE ("ACE_FIFO_Recv::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_FIFO::dump ();
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("aux_handle_ = %d"), this->aux_handle_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}
| int ACE_FIFO_Recv::open | ( | const ACE_TCHAR * | rendezvous, | |
| int | flags = O_CREAT | O_RDONLY, |
|||
| mode_t | perms = ACE_DEFAULT_FILE_PERMS, |
|||
| int | persistent = 1, |
|||
| LPSECURITY_ATTRIBUTES | sa = 0 | |||
| ) |
Open up a bytestream named pipe for reading.
Reimplemented in ACE_FIFO_Recv_Msg.
Definition at line 46 of file FIFO_Recv.cpp.
{
ACE_TRACE ("ACE_FIFO_Recv::open");
if (ACE_FIFO::open (fifo_name, ACE_NONBLOCK | flags, perms, sa) == -1)
return -1;
else if (this->disable (ACE_NONBLOCK) == -1)
return -1;
else if (persistent
&& (this->aux_handle_ = ACE_OS::open (fifo_name, O_WRONLY, 0, sa)) == ACE_INVALID_HANDLE)
return -1;
else
return this->get_handle () == ACE_INVALID_HANDLE ? -1 : 0;
}
| ssize_t ACE_FIFO_Recv::recv | ( | void * | buf, | |
| size_t | len | |||
| ) | [inline] |
Recv buf of up to len bytes.
Reimplemented in ACE_FIFO_Recv_Msg.
Definition at line 11 of file FIFO_Recv.inl.
{
ACE_TRACE ("ACE_FIFO_Recv::recv");
return ACE_OS::read (this->get_handle (), (char *) buf, len);
}
| ssize_t ACE_FIFO_Recv::recv_n | ( | void * | buf, | |
| size_t | len | |||
| ) | [inline] |
Recv buf of exactly len bytes (block until done).
Definition at line 18 of file FIFO_Recv.inl.
{
ACE_TRACE ("ACE_FIFO_Recv::recv_n");
return ACE::recv_n (this->get_handle (), buf, n);
}
Declare the dynamic allocation hooks.
Reimplemented from ACE_FIFO.
Reimplemented in ACE_FIFO_Recv_Msg.
Definition at line 70 of file FIFO_Recv.h.
ACE_HANDLE ACE_FIFO_Recv::aux_handle_ [private] |
Auxiliary handle that is used to implement persistent FIFOs.
Definition at line 74 of file FIFO_Recv.h.
1.7.0