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!
47 /// Default constructor.
50 /// Open up a bytestream named pipe for reading.
51 ACE_FIFO_Recv (const ACE_TCHAR
*rendezvous
,
52 int flags
= O_CREAT
| O_RDONLY
,
53 mode_t perms
= ACE_DEFAULT_FILE_PERMS
,
55 LPSECURITY_ATTRIBUTES sa
= 0);
57 /// Open up a bytestream named pipe for reading.
58 int open (const ACE_TCHAR
*rendezvous
,
59 int flags
= O_CREAT
| O_RDONLY
,
60 mode_t perms
= ACE_DEFAULT_FILE_PERMS
,
62 LPSECURITY_ATTRIBUTES sa
= 0);
65 /// Close down the fifo.
68 /// Recv @a buf of up to @a len bytes.
69 ssize_t
recv (void *buf
, size_t len
);
71 /// Recv @a buf of exactly @a len bytes (block until done).
72 ssize_t
recv_n (void *buf
, size_t len
);
74 /// Dump the state of an object.
77 /// Declare the dynamic allocation hooks.
78 ACE_ALLOC_HOOK_DECLARE
;
81 /// Auxiliary handle that is used to implement persistent FIFOs.
82 ACE_HANDLE aux_handle_
;
85 ACE_END_VERSIONED_NAMESPACE_DECL
87 #if defined (__ACE_INLINE__)
88 #include "ace/FIFO_Recv.inl"
89 #endif /* __ACE_INLINE__ */
91 #include /**/ "ace/post.h"
93 #endif /* ACE_FIFO_RECV_H */