Sender side for the Record oriented C++ wrapper for UNIX FIFOs. More...
#include <FIFO_Send_Msg.h>
Public Member Functions | |
ACE_FIFO_Send_Msg (void) | |
Default constructor. | |
ACE_FIFO_Send_Msg (const ACE_TCHAR *rendezvous, int flags=O_WRONLY, mode_t perms=ACE_DEFAULT_FILE_PERMS, LPSECURITY_ATTRIBUTES sa=0) | |
Open up a record-oriented named pipe for writing. | |
int | open (const ACE_TCHAR *rendezvous, int flags=O_WRONLY, mode_t perms=ACE_DEFAULT_FILE_PERMS, LPSECURITY_ATTRIBUTES sa=0) |
Open up a record-oriented named pipe for writing. | |
ssize_t | send (const ACE_Str_Buf &msg) |
Send buf of up to len bytes. | |
ssize_t | send (const void *buf, size_t len) |
Send 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. |
Sender side for the Record oriented C++ wrapper for UNIX FIFOs.
Definition at line 39 of file FIFO_Send_Msg.h.
ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg | ( | void | ) |
Default constructor.
Definition at line 55 of file FIFO_Send_Msg.cpp.
{
// ACE_TRACE ("ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg");
}
ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg | ( | const ACE_TCHAR * | rendezvous, | |
int | flags = O_WRONLY , |
|||
mode_t | perms = ACE_DEFAULT_FILE_PERMS , |
|||
LPSECURITY_ATTRIBUTES | sa = 0 | |||
) |
Open up a record-oriented named pipe for writing.
Definition at line 70 of file FIFO_Send_Msg.cpp.
void ACE_FIFO_Send_Msg::dump | ( | void | ) | const |
Dump the state of an object.
Reimplemented from ACE_FIFO_Send.
Definition at line 19 of file FIFO_Send_Msg.cpp.
{ #if defined (ACE_HAS_DUMP) ACE_TRACE ("ACE_FIFO_Send_Msg::dump"); ACE_FIFO_Send::dump (); #endif /* ACE_HAS_DUMP */ }
int ACE_FIFO_Send_Msg::open | ( | const ACE_TCHAR * | rendezvous, | |
int | flags = O_WRONLY , |
|||
mode_t | perms = ACE_DEFAULT_FILE_PERMS , |
|||
LPSECURITY_ATTRIBUTES | sa = 0 | |||
) |
Open up a record-oriented named pipe for writing.
Reimplemented from ACE_FIFO_Send.
Definition at line 61 of file FIFO_Send_Msg.cpp.
{ ACE_TRACE ("ACE_FIFO_Send_Msg::open"); return ACE_FIFO_Send::open (fifo_name, flags | O_WRONLY, perms, sa); }
ssize_t ACE_FIFO_Send_Msg::send | ( | const void * | buf, | |
size_t | len | |||
) | [inline] |
Send buf of exactly len bytes (block until done).
Reimplemented from ACE_FIFO_Send.
Definition at line 10 of file FIFO_Send_Msg.inl.
{ ACE_TRACE ("ACE_FIFO_Send_Msg::send"); ACE_Str_Buf send_msg ((char *) buf, static_cast<int> (len)); return this->send (send_msg); }
ssize_t ACE_FIFO_Send_Msg::send | ( | const ACE_Str_Buf & | msg | ) |
Send buf of up to len bytes.
Definition at line 28 of file FIFO_Send_Msg.cpp.
{ // ACE_TRACE ("ACE_FIFO_Send_Msg::send"); #if defined (ACE_HAS_STREAM_PIPES) if (ACE_OS::putmsg (this->get_handle (), (strbuf *) 0, (strbuf *) &send_msg, 0) == -1) return -1; else return send_msg.len; #else iovec iov[2]; iov[0].iov_base = (char *) &send_msg.len; iov[0].iov_len = sizeof send_msg.len; iov[1].iov_base = (char *) send_msg.buf; iov[1].iov_len = static_cast<u_long> (send_msg.len); ssize_t sent = ACE_OS::writev (this->get_handle (), iov, 2); if (sent > 0) sent -= iov[0].iov_len; // Don't count the length we added. return sent; #endif /* ACE_HAS_STREAM_PIPES */ }
Declare the dynamic allocation hooks.
Reimplemented from ACE_FIFO_Send.
Definition at line 81 of file FIFO_Send_Msg.h.