Document return values
[ACE_TAO.git] / ACE / ace / FIFO_Send.h
blob0ffa228a0d86f8555b59e60f62bf29a59bf05b44
1 // -*- C++ -*-
3 //==========================================================================
4 /**
5 * @file FIFO_Send.h
7 * @author Doug Schmidt
8 */
9 //==========================================================================
11 #ifndef ACE_FIFO_SEND_H
12 #define ACE_FIFO_SEND_H
14 #include /**/ "ace/pre.h"
16 #include "ace/FIFO.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "ace/os_include/os_fcntl.h"
23 #include "ace/Default_Constants.h"
25 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
27 /**
28 * @class ACE_FIFO_Send
30 * @brief Sender side for the bytestream C++ wrapper for UNIX FIFOs
32 class ACE_Export ACE_FIFO_Send : public ACE_FIFO
34 public:
35 /// @name Initialization methods.
36 ///
37 /// Note that @c O_WRONLY will be added to any @a flags value passed.
38 /// Default behavior is to block until a receiver also opens the fifo.
39 /// To use non-blocking behavior include ACE_NONBLOCK in @a flags.
40 //@{
41 /// Default constructor.
42 ACE_FIFO_Send ();
44 /// Open up a bytestream named pipe for writing.
45 ACE_FIFO_Send (const ACE_TCHAR *rendezvous,
46 int flags = O_WRONLY,
47 mode_t perms = ACE_DEFAULT_FILE_PERMS,
48 LPSECURITY_ATTRIBUTES sa = 0);
50 /// Open up a bytestream named pipe for writing.
51 int open (const ACE_TCHAR *rendezvous,
52 int flags = O_WRONLY,
53 mode_t perms = ACE_DEFAULT_FILE_PERMS,
54 LPSECURITY_ATTRIBUTES sa = 0);
55 //@}
57 /// Send @a buf of up to @a len bytes.
58 ssize_t send (const void *buf, size_t len);
60 /// Send @a buf of exactly @a len bytes (block until done).
61 ssize_t send_n (const void *buf, size_t len);
63 /// Dump the state of an object.
64 void dump () const;
66 /// Declare the dynamic allocation hooks.
67 ACE_ALLOC_HOOK_DECLARE;
70 ACE_END_VERSIONED_NAMESPACE_DECL
72 #if defined (__ACE_INLINE__)
73 #include "ace/FIFO_Send.inl"
74 #endif /* __ACE_INLINE__ */
76 #include /**/ "ace/post.h"
78 #endif /* ACE_FIFO_SEND_H */