3 //==========================================================================
9 //==========================================================================
14 #include /**/ "ace/pre.h"
16 #include /**/ "ace/ACE_export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "ace/IPC_SAP.h"
23 #include "ace/os_include/os_limits.h"
25 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
30 * @brief Abstract base class for UNIX FIFOs
32 * UNIX FIFOs are also known Named Pipes, which are totally
33 * unrelated to Windows Named Pipes. If you want to use a local
34 * IPC mechanism that will be portable to both UNIX and Windows,
35 * take a look at the ACE_Pipe or ACE_SPIPE_Stream classes.
37 class ACE_Export ACE_FIFO
: public ACE_IPC_SAP
41 * Open up the named pipe (FIFO) on the @a rendezvous point in accordance
44 * If @a flags contains @c O_CREAT open() will attempt to call mkfifo()
45 * to create the FIFO before opening it. In this case, this method
46 * will not fail simply because the fifo already exists.
48 * @retval 0 for success
49 * @retval -1 for error; errno contains the error code.
51 int open (const ACE_TCHAR
*rendezvous
, int flags
, mode_t perms
,
52 LPSECURITY_ATTRIBUTES sa
= 0);
54 /// Close down the ACE_FIFO without removing the rendezvous point.
57 /// Close down the ACE_FIFO and remove the rendezvous point from the
61 /// Return the local address of this endpoint.
62 int get_local_addr (const ACE_TCHAR
*&rendezvous
) const;
64 /// Dump the state of an object.
67 /// Declare the dynamic allocation hooks.
68 ACE_ALLOC_HOOK_DECLARE
;
72 * Protected constructors ensure this class cannot be used directly.
73 * User code must use ACE_FIFO_Send and/or ACE_FIFO_Recv.
76 /// Default constructor.
79 /// Open up the named pipe on the @a rendezvous in accordance with the
81 ACE_FIFO (const ACE_TCHAR
*rendezvous
, int flags
, mode_t perms
,
82 LPSECURITY_ATTRIBUTES sa
= 0);
86 /// Rendezvous point in the file system.
87 ACE_TCHAR rendezvous_
[MAXPATHLEN
+ 1];
90 ACE_END_VERSIONED_NAMESPACE_DECL
92 #if defined (__ACE_INLINE__)
93 #include "ace/FIFO.inl"
94 #endif /* __ACE_INLINE__ */
96 #include /**/ "ace/post.h"
97 #endif /* ACE_FIFO_H */