MEM_Stream.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // MEM_Stream.inl,v 4.3 2005/10/28 16:14:53 ossama Exp
00004 
00005 #include "ace/MEM_Stream.h"
00006 #include "ace/OS_NS_sys_socket.h"
00007 
00008 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00009 
00010 ACE_INLINE
00011 ACE_MEM_Stream::ACE_MEM_Stream (void)
00012 {
00013   // ACE_TRACE ("ACE_MEM_Stream::ACE_MEM_Stream");
00014 }
00015 
00016 ACE_INLINE
00017 ACE_MEM_Stream::ACE_MEM_Stream (ACE_HANDLE h)
00018 {
00019   // ACE_TRACE ("ACE_MEM_Stream::ACE_MEM_Stream");
00020   this->set_handle (h);
00021 }
00022 
00023 ACE_INLINE
00024 ACE_MEM_Stream::~ACE_MEM_Stream (void)
00025 {
00026   // ACE_TRACE ("ACE_MEM_Stream::~ACE_MEM_Stream");
00027 }
00028 
00029 ACE_INLINE int
00030 ACE_MEM_Stream::close_reader (void)
00031 {
00032   ACE_TRACE ("ACE_MEM_Stream::close_reader");
00033   if (this->get_handle () != ACE_INVALID_HANDLE)
00034     return ACE_OS::shutdown (this->get_handle (), ACE_SHUTDOWN_READ);
00035   else
00036     return 0;
00037 }
00038 
00039 // Shut down just the writing end of a ACE_SOCK.
00040 
00041 ACE_INLINE int
00042 ACE_MEM_Stream::close_writer (void)
00043 {
00044   ACE_TRACE ("ACE_MEM_Stream::close_writer");
00045   if (this->get_handle () != ACE_INVALID_HANDLE)
00046     return ACE_OS::shutdown (this->get_handle (), ACE_SHUTDOWN_WRITE);
00047   else
00048     return 0;
00049 }
00050 
00051 ACE_INLINE ssize_t
00052 ACE_MEM_Stream::send_n (const void *buf, size_t n)
00053 {
00054   return this->send (buf, n);
00055 }
00056 
00057 
00058 ACE_INLINE ssize_t
00059 ACE_MEM_Stream::recv_n (void *buf, size_t n)
00060 {
00061   return this->recv (buf, n);
00062 }
00063 
00064 ACE_INLINE ssize_t
00065 ACE_MEM_Stream::send_n (const void *buf, size_t n, int flags)
00066 {
00067   return this->send (buf, n, flags);
00068 }
00069 
00070 ACE_INLINE ssize_t
00071 ACE_MEM_Stream::recv_n (void *buf, size_t n, int flags)
00072 {
00073   return this->recv (buf, n, flags);
00074 }
00075 
00076 #if 0
00077 ACE_INLINE ssize_t
00078 ACE_MEM_Stream::recv_n (void *buf,
00079                          size_t len,
00080                          int flags,
00081                          const ACE_Time_Value *timeout) const
00082 {
00083   ACE_TRACE ("ACE_MEM_Stream::recv_n");
00084   return ACE::recv_n (this->get_handle (),
00085                       buf,
00086                       len,
00087                       flags,
00088                       timeout);
00089 }
00090 
00091 ACE_INLINE ssize_t
00092 ACE_MEM_Stream::recv_n (void *buf,
00093                          size_t len,
00094                          const ACE_Time_Value *timeout) const
00095 {
00096   ACE_TRACE ("ACE_MEM_Stream::recv_n");
00097   return ACE::recv_n (this->get_handle (),
00098                       buf,
00099                       len,
00100                       timeout);
00101 }
00102 
00103 ACE_INLINE ssize_t
00104 ACE_MEM_Stream::recvv_n (iovec iov[],
00105                           size_t n,
00106                           const ACE_Time_Value *timeout) const
00107 {
00108   ACE_TRACE ("ACE_MEM_Stream::recvv_n");
00109   return ACE::recvv_n (this->get_handle (),
00110                        iov,
00111                        n,
00112                        timeout);
00113 }
00114 
00115 ACE_INLINE ssize_t
00116 ACE_MEM_Stream::send_n (const void *buf,
00117                          size_t len,
00118                          int flags,
00119                          const ACE_Time_Value *timeout) const
00120 {
00121   ACE_TRACE ("ACE_MEM_Stream::send_n");
00122   return ACE::send_n (this->get_handle (),
00123                       buf,
00124                       len,
00125                       flags,
00126                       timeout);
00127 }
00128 
00129 ACE_INLINE ssize_t
00130 ACE_MEM_Stream::send_n (const void *buf,
00131                          size_t len,
00132                          const ACE_Time_Value *timeout) const
00133 {
00134   ACE_TRACE ("ACE_MEM_Stream::send_n");
00135   return ACE::send_n (this->get_handle (),
00136                       buf,
00137                       len,
00138                       timeout);
00139 }
00140 
00141 ACE_INLINE ssize_t
00142 ACE_MEM_Stream::sendv_n (iovec iov[],
00143                           size_t n,
00144                           const ACE_Time_Value *timeout) const
00145 {
00146   ACE_TRACE ("ACE_MEM_Stream::sendv_n");
00147   return ACE::sendv_n (this->get_handle (),
00148                        iov,
00149                        n,
00150                        timeout);
00151 }
00152 
00153 ACE_INLINE ssize_t
00154 ACE_MEM_Stream::send_urg (const void *ptr,
00155                            size_t len,
00156                            const ACE_Time_Value *timeout) const
00157 {
00158   ACE_TRACE ("ACE_MEM_Stream::send_urg");
00159   return ACE::send (this->get_handle (),
00160                     ptr,
00161                     len,
00162                     MSG_OOB,
00163                     timeout);
00164 }
00165 
00166 ACE_INLINE ssize_t
00167 ACE_MEM_Stream::recv_urg (void *ptr,
00168                            size_t len,
00169                            const ACE_Time_Value *timeout) const
00170 {
00171   ACE_TRACE ("ACE_MEM_Stream::recv_urg");
00172   return ACE::recv (this->get_handle (),
00173                     ptr,
00174                     len,
00175                     MSG_OOB,
00176                     timeout);
00177 }
00178 #endif /* 0 */
00179 
00180 ACE_END_VERSIONED_NAMESPACE_DECL

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