Document return values
[ACE_TAO.git] / ACE / ace / FIFO_Send_Msg.h
blob1b9dfc3c40cca58eee574a9075cfca1c93c84d5f
1 /* -*- C++ -*- */
3 //=============================================================================
4 /**
5 * @file FIFO_Send_Msg.h
7 * @author Doug Schmidt
8 */
9 //=============================================================================
12 #ifndef ACE_FIFO_SEND_MSG_H
13 #define ACE_FIFO_SEND_MSG_H
14 #include /**/ "ace/pre.h"
16 #include "ace/FIFO_Send.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #if defined (ACE_HAS_STREAM_PIPES)
23 # include "ace/OS_NS_stropts.h"
24 #endif /* ACE_HAS_STREAM_PIPES */
26 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
28 // Forward Decls
29 class ACE_Str_Buf;
31 /**
32 * @class ACE_FIFO_Send_Msg
34 * @brief Sender side for the Record oriented C++ wrapper for UNIX
35 * FIFOs.
37 class ACE_Export ACE_FIFO_Send_Msg : public ACE_FIFO_Send
39 public:
40 /// Default constructor.
41 ACE_FIFO_Send_Msg ();
43 /// Open up a record-oriented named pipe for writing.
44 ACE_FIFO_Send_Msg (const ACE_TCHAR *rendezvous,
45 int flags = O_WRONLY,
46 mode_t perms = ACE_DEFAULT_FILE_PERMS,
47 LPSECURITY_ATTRIBUTES sa = 0);
49 /// Open up a record-oriented named pipe for writing.
50 int open (const ACE_TCHAR *rendezvous,
51 int flags = O_WRONLY,
52 mode_t perms = ACE_DEFAULT_FILE_PERMS,
53 LPSECURITY_ATTRIBUTES sa = 0);
55 /// Send @a buf of up to @a len bytes.
56 ssize_t send (const ACE_Str_Buf &msg);
58 /// Send @a buf of exactly @a len bytes (block until done).
59 ssize_t send (const void *buf, size_t len);
61 #if defined (ACE_HAS_STREAM_PIPES)
62 /// Send @a data and @a cntl message via Stream pipes.
63 ssize_t send (const ACE_Str_Buf *data,
64 const ACE_Str_Buf *cntl = 0,
65 int flags = 0);
67 /// Send @a data and @a cntl message via Stream pipes in "band" mode.
68 ssize_t send (int band,
69 const ACE_Str_Buf *data,
70 const ACE_Str_Buf *cntl = 0,
71 int flags = MSG_BAND);
72 #endif /* ACE_HAS_STREAM_PIPES */
74 /// Dump the state of an object.
75 void dump () const;
77 /// Declare the dynamic allocation hooks.
78 ACE_ALLOC_HOOK_DECLARE;
81 ACE_END_VERSIONED_NAMESPACE_DECL
83 #if defined (__ACE_INLINE__)
84 #include "ace/FIFO_Send_Msg.inl"
85 #endif /* __ACE_INLINE__ */
87 #include /**/ "ace/post.h"
88 #endif /* ACE_FIFO_SEND_MSG_H */