FIFO_Send_Msg.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // FIFO_Send_Msg.inl,v 4.2 2005/10/28 16:14:52 ossama Exp
00004 
00005 #include "ace/OS_NS_stropts.h"
00006 
00007 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00008 
00009 ACE_INLINE ssize_t
00010 ACE_FIFO_Send_Msg::send (const void *buf, size_t len)
00011 {
00012   ACE_TRACE ("ACE_FIFO_Send_Msg::send");
00013   ACE_Str_Buf send_msg ((char *) buf, static_cast<int> (len));
00014 
00015   return this->send (send_msg);
00016 }
00017 
00018 #if defined (ACE_HAS_STREAM_PIPES)
00019 ACE_INLINE ssize_t
00020 ACE_FIFO_Send_Msg::send (const ACE_Str_Buf *data,
00021                          const ACE_Str_Buf *cntl,
00022                          int flags)
00023 {
00024   ACE_TRACE ("ACE_FIFO_Send_Msg::send");
00025   if (ACE_OS::putmsg (this->get_handle (),
00026                       (strbuf *) cntl,
00027                       (strbuf *) data,
00028                       flags) == -1)
00029     return-1;
00030   else
00031     return (cntl == 0 ? 0 : cntl->len) + (data == 0 ? 0 : data->len);
00032 }
00033 
00034 ACE_INLINE ssize_t
00035 ACE_FIFO_Send_Msg::send (int band,
00036                          const ACE_Str_Buf *data,
00037                          const ACE_Str_Buf *cntl,
00038                          int flags)
00039 {
00040   ACE_TRACE ("ACE_FIFO_Send_Msg::send");
00041 
00042   if (ACE_OS::putpmsg (this->get_handle (),
00043                        (strbuf *) cntl,
00044                        (strbuf *) data,
00045                        band,
00046                        flags) == -1)
00047     return -1;
00048   else
00049     return (cntl == 0 ? 0 : cntl->len) + (data == 0 ? 0 : data->len);
00050 }
00051 #endif /* ACE_HAS_STREAM_PIPES */
00052 
00053 ACE_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 09:41:50 2006 for ACE by doxygen 1.3.6