summaryrefslogtreecommitdiff
path: root/ACE/ace/FIFO_Send_Msg.inl
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:30 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:30 +0000
commitc44379cc7d9c7aa113989237ab0f56db12aa5219 (patch)
tree66a84b20d47f2269d8bdc6e0323f338763424d3a /ACE/ace/FIFO_Send_Msg.inl
parent3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (diff)
downloadATCD-c44379cc7d9c7aa113989237ab0f56db12aa5219.tar.gz
Repo restructuring
Diffstat (limited to 'ACE/ace/FIFO_Send_Msg.inl')
-rw-r--r--ACE/ace/FIFO_Send_Msg.inl53
1 files changed, 53 insertions, 0 deletions
diff --git a/ACE/ace/FIFO_Send_Msg.inl b/ACE/ace/FIFO_Send_Msg.inl
new file mode 100644
index 00000000000..74392656597
--- /dev/null
+++ b/ACE/ace/FIFO_Send_Msg.inl
@@ -0,0 +1,53 @@
+// -*- C++ -*-
+//
+// $Id$
+
+#include "ace/OS_NS_stropts.h"
+
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
+ACE_INLINE ssize_t
+ACE_FIFO_Send_Msg::send (const void *buf, size_t len)
+{
+ ACE_TRACE ("ACE_FIFO_Send_Msg::send");
+ ACE_Str_Buf send_msg ((char *) buf, static_cast<int> (len));
+
+ return this->send (send_msg);
+}
+
+#if defined (ACE_HAS_STREAM_PIPES)
+ACE_INLINE ssize_t
+ACE_FIFO_Send_Msg::send (const ACE_Str_Buf *data,
+ const ACE_Str_Buf *cntl,
+ int flags)
+{
+ ACE_TRACE ("ACE_FIFO_Send_Msg::send");
+ if (ACE_OS::putmsg (this->get_handle (),
+ (strbuf *) cntl,
+ (strbuf *) data,
+ flags) == -1)
+ return-1;
+ else
+ return (cntl == 0 ? 0 : cntl->len) + (data == 0 ? 0 : data->len);
+}
+
+ACE_INLINE ssize_t
+ACE_FIFO_Send_Msg::send (int band,
+ const ACE_Str_Buf *data,
+ const ACE_Str_Buf *cntl,
+ int flags)
+{
+ ACE_TRACE ("ACE_FIFO_Send_Msg::send");
+
+ if (ACE_OS::putpmsg (this->get_handle (),
+ (strbuf *) cntl,
+ (strbuf *) data,
+ band,
+ flags) == -1)
+ return -1;
+ else
+ return (cntl == 0 ? 0 : cntl->len) + (data == 0 ? 0 : data->len);
+}
+#endif /* ACE_HAS_STREAM_PIPES */
+
+ACE_END_VERSIONED_NAMESPACE_DECL