Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / SOCK_Stream.inl
blobf2aad80ad3eb2bdebc5699995c8646affa86f87a
1 // -*- C++ -*-
2 #include "ace/SOCK_Stream.h"
3 #include "ace/OS_NS_sys_socket.h"
5 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
7 ACE_INLINE
8 ACE_SOCK_Stream::ACE_SOCK_Stream ()
10   // ACE_TRACE ("ACE_SOCK_Stream::ACE_SOCK_Stream");
13 ACE_INLINE
14 ACE_SOCK_Stream::ACE_SOCK_Stream (ACE_HANDLE h)
16   // ACE_TRACE ("ACE_SOCK_Stream::ACE_SOCK_Stream");
17   this->set_handle (h);
20 ACE_INLINE
21 ACE_SOCK_Stream::~ACE_SOCK_Stream ()
23   // ACE_TRACE ("ACE_SOCK_Stream::~ACE_SOCK_Stream");
26 ACE_INLINE int
27 ACE_SOCK_Stream::close_reader ()
29   ACE_TRACE ("ACE_SOCK_Stream::close_reader");
30   if (this->get_handle () != ACE_INVALID_HANDLE)
31     return ACE_OS::shutdown (this->get_handle (), ACE_SHUTDOWN_READ);
32   else
33     return 0;
36 // Shut down just the writing end of a ACE_SOCK.
38 ACE_INLINE int
39 ACE_SOCK_Stream::close_writer ()
41   ACE_TRACE ("ACE_SOCK_Stream::close_writer");
42   if (this->get_handle () != ACE_INVALID_HANDLE)
43     return ACE_OS::shutdown (this->get_handle (), ACE_SHUTDOWN_WRITE);
44   else
45     return 0;
48 ACE_INLINE ssize_t
49 ACE_SOCK_Stream::recv_n (void *buf,
50                          size_t len,
51                          int flags,
52                          const ACE_Time_Value *timeout,
53                          size_t *bytes_transferred) const
55   ACE_TRACE ("ACE_SOCK_Stream::recv_n");
56   return ACE::recv_n (this->get_handle (),
57                       buf,
58                       len,
59                       flags,
60                       timeout,
61                       bytes_transferred);
64 ACE_INLINE ssize_t
65 ACE_SOCK_Stream::recv_n (void *buf,
66                          size_t len,
67                          const ACE_Time_Value *timeout,
68                          size_t *bytes_transferred) const
70   ACE_TRACE ("ACE_SOCK_Stream::recv_n");
71   return ACE::recv_n (this->get_handle (),
72                       buf,
73                       len,
74                       timeout,
75                       bytes_transferred);
78 ACE_INLINE ssize_t
79 ACE_SOCK_Stream::recvv_n (iovec iov[],
80                           int n,
81                           const ACE_Time_Value *timeout,
82                           size_t *bytes_transferred) const
84   ACE_TRACE ("ACE_SOCK_Stream::recvv_n");
85   return ACE::recvv_n (this->get_handle (),
86                        iov,
87                        n,
88                        timeout,
89                        bytes_transferred);
92 ACE_INLINE ssize_t
93 ACE_SOCK_Stream::send_n (const void *buf,
94                          size_t len,
95                          int flags,
96                          const ACE_Time_Value *timeout,
97                          size_t *bytes_transferred) const
99   ACE_TRACE ("ACE_SOCK_Stream::send_n");
100   return ACE::send_n (this->get_handle (),
101                       buf,
102                       len,
103                       flags,
104                       timeout,
105                       bytes_transferred);
108 ACE_INLINE ssize_t
109 ACE_SOCK_Stream::send_n (const void *buf,
110                          size_t len,
111                          const ACE_Time_Value *timeout,
112                          size_t *bytes_transferred) const
114   ACE_TRACE ("ACE_SOCK_Stream::send_n");
115   return ACE::send_n (this->get_handle (),
116                       buf,
117                       len,
118                       timeout,
119                       bytes_transferred);
122 ACE_INLINE ssize_t
123 ACE_SOCK_Stream::sendv_n (const iovec iov[],
124                           int n,
125                           const ACE_Time_Value *timeout,
126                           size_t *bytes_transferred) const
128   ACE_TRACE ("ACE_SOCK_Stream::sendv_n");
129   return ACE::sendv_n (this->get_handle (),
130                        iov,
131                        n,
132                        timeout,
133                        bytes_transferred);
136 ACE_INLINE ssize_t
137 ACE_SOCK_Stream::send_n (const ACE_Message_Block *message_block,
138                          const ACE_Time_Value *timeout,
139                          size_t *bytes_transferred) const
141   ACE_TRACE ("ACE_SOCK_Stream::send_n");
142   return ACE::send_n (this->get_handle (),
143                       message_block,
144                       timeout,
145                       bytes_transferred);
148 ACE_INLINE ssize_t
149 ACE_SOCK_Stream::send_urg (const void *ptr,
150                            size_t len,
151                            const ACE_Time_Value *timeout) const
153   ACE_TRACE ("ACE_SOCK_Stream::send_urg");
154   return ACE::send (this->get_handle (),
155                     ptr,
156                     len,
157                     MSG_OOB,
158                     timeout);
161 ACE_INLINE ssize_t
162 ACE_SOCK_Stream::recv_urg (void *ptr,
163                            size_t len,
164                            const ACE_Time_Value *timeout) const
166   ACE_TRACE ("ACE_SOCK_Stream::recv_urg");
167   return ACE::recv (this->get_handle (),
168                     ptr,
169                     len,
170                     MSG_OOB,
171                     timeout);
174 ACE_END_VERSIONED_NAMESPACE_DECL