3 //==========================================================================
9 //==========================================================================
12 #ifndef ACE_FIFO_RECV_H
13 #define ACE_FIFO_RECV_H
15 #include /**/ "ace/pre.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "ace/os_include/os_fcntl.h"
24 #include "ace/Default_Constants.h"
26 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
29 * @class ACE_FIFO_Recv
31 * @brief Receiver side of the bytestream C++ wrapper for UNIX
34 class ACE_Export ACE_FIFO_Recv
: public ACE_FIFO
37 /// @name Initialization methods.
39 /// Note that @c ACE_NONBLOCK will be added to any @a flags value passed.
40 /// This causes the open to succeed even if no writer has yet opened the
41 /// fifo. There is no way to disable this behavior.
43 /// @arg persistent Means "open fifo for writing, as well as
44 /// reading." This ensures that the fifo never gets EOF, even if there
45 /// aren't any writers at the moment!
48 /// Default constructor.
51 /// Open up a bytestream named pipe for reading.
52 ACE_FIFO_Recv (const ACE_TCHAR
*rendezvous
,
53 int flags
= O_CREAT
| O_RDONLY
,
54 mode_t perms
= ACE_DEFAULT_FILE_PERMS
,
56 LPSECURITY_ATTRIBUTES sa
= 0);
58 /// Open up a bytestream named pipe for reading.
59 int open (const ACE_TCHAR
*rendezvous
,
60 int flags
= O_CREAT
| O_RDONLY
,
61 mode_t perms
= ACE_DEFAULT_FILE_PERMS
,
63 LPSECURITY_ATTRIBUTES sa
= 0);
66 /// Close down the fifo.
69 /// Recv @a buf of up to @a len bytes.
70 ssize_t
recv (void *buf
, size_t len
);
72 /// Recv @a buf of exactly @a len bytes (block until done).
73 ssize_t
recv_n (void *buf
, size_t len
);
75 /// Dump the state of an object.
76 void dump (void) const;
78 /// Declare the dynamic allocation hooks.
79 ACE_ALLOC_HOOK_DECLARE
;
82 /// Auxiliary handle that is used to implement persistent FIFOs.
83 ACE_HANDLE aux_handle_
;
86 ACE_END_VERSIONED_NAMESPACE_DECL
88 #if defined (__ACE_INLINE__)
89 #include "ace/FIFO_Recv.inl"
90 #endif /* __ACE_INLINE__ */
92 #include /**/ "ace/post.h"
94 #endif /* ACE_FIFO_RECV_H */