Correct feature names
[ACE_TAO.git] / ACE / ace / FIFO_Recv.h
blobbf3c9a8d2ec08c060a017dd9ea53d10fc6949078
1 // -*- C++ -*-
3 //==========================================================================
4 /**
5 * @file FIFO_Recv.h
7 * @author Doug Schmidt
8 */
9 //==========================================================================
12 #ifndef ACE_FIFO_RECV_H
13 #define ACE_FIFO_RECV_H
15 #include /**/ "ace/pre.h"
17 #include "ace/FIFO.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # 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
28 /**
29 * @class ACE_FIFO_Recv
31 * @brief Receiver side of the bytestream C++ wrapper for UNIX
32 * FIFOs.
34 class ACE_Export ACE_FIFO_Recv : public ACE_FIFO
36 public:
37 /// @name Initialization methods.
38 ///
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.
42 ///
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!
46 //@{
48 /// Default constructor.
49 ACE_FIFO_Recv (void);
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,
55 int persistent = 1,
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,
62 int persistent = 1,
63 LPSECURITY_ATTRIBUTES sa = 0);
64 //@}
66 /// Close down the fifo.
67 int close (void);
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;
81 private:
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 */