*Backed out changeset 3be01fb200a5

--HG--
branch : trunk
This commit is contained in:
maximius
2009-10-17 15:51:44 -07:00
parent 26b5e033ff
commit e585187b24
2257 changed files with 103863 additions and 761 deletions
+22
View File
@@ -1,27 +1,33 @@
// -*- C++ -*-
//
// $Id: Pipe.inl 80826 2008-03-04 14:51:23Z wotte $
#include "ace/Global_Macros.h"
#include "ace/ACE.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE
ACE_Pipe::~ACE_Pipe (void)
{
ACE_TRACE ("ACE_Pipe::~ACE_Pipe");
// Notice that the destructor doesn't close the handles for you.
}
ACE_INLINE ACE_HANDLE
ACE_Pipe::read_handle (void) const
{
ACE_TRACE ("ACE_Pipe::read_handle");
return this->handles_[0];
}
ACE_INLINE ACE_HANDLE
ACE_Pipe::write_handle (void) const
{
ACE_TRACE ("ACE_Pipe::write_handle");
return this->handles_[1];
}
ACE_INLINE ssize_t
ACE_Pipe::sendv_n (const iovec iov[], int n) const
{
@@ -36,6 +42,7 @@ ACE_Pipe::sendv_n (const iovec iov[], int n) const
n);
#endif /* ACE_WIN32 */
}
ACE_INLINE ssize_t
ACE_Pipe::send_n (const ACE_Message_Block *message_block,
const ACE_Time_Value *timeout,
@@ -54,7 +61,9 @@ ACE_Pipe::send_n (const ACE_Message_Block *message_block,
bytes_transferred);
#endif /* ACE_WIN32 */
}
// Recv an n byte message from the file.
ACE_INLINE ssize_t
ACE_Pipe::recvv_n (iovec iov[], int n) const
{
@@ -71,7 +80,9 @@ ACE_Pipe::recvv_n (iovec iov[], int n) const
n);
#endif /* ACE_WIN32 */
}
// Send an <iovec> of size <n> to the file.
ACE_INLINE ssize_t
ACE_Pipe::sendv (const iovec iov[], int n) const
{
@@ -82,8 +93,10 @@ ACE_Pipe::sendv (const iovec iov[], int n) const
return ACE_OS::writev (this->write_handle (), iov, n);
#endif /* ACE_WIN32 */
}
// Send exactly N bytes from BUF to this file. Keeping trying until
// this many bytes are sent.
ACE_INLINE ssize_t
ACE_Pipe::send_n (const void *buf, size_t n) const
{
@@ -94,8 +107,10 @@ ACE_Pipe::send_n (const void *buf, size_t n) const
return ACE::write_n (this->write_handle (), buf, n);
#endif /* ACE_WIN32 */
}
// Receive exactly N bytes from this file into BUF. Keep trying until
// this many bytes are received.
ACE_INLINE ssize_t
ACE_Pipe::recv_n (void *buf, size_t n) const
{
@@ -106,6 +121,7 @@ ACE_Pipe::recv_n (void *buf, size_t n) const
return ACE::read_n (this->read_handle (), buf, n);
#endif /* ACE_WIN32 */
}
ACE_INLINE ssize_t
ACE_Pipe::send (const void *buf, size_t n) const
{
@@ -116,6 +132,7 @@ ACE_Pipe::send (const void *buf, size_t n) const
return ACE_OS::write (this->write_handle (), static_cast <const char *> (buf), n);
#endif /* ACE_WIN32 */
}
ACE_INLINE ssize_t
ACE_Pipe::recv (void *buf, size_t n) const
{
@@ -126,6 +143,7 @@ ACE_Pipe::recv (void *buf, size_t n) const
return ACE_OS::read (this->read_handle (), static_cast <char *> (buf), n);
#endif /* ACE_WIN32 */
}
ACE_INLINE ssize_t
ACE_Pipe::send (const iovec iov[], int n) const
{
@@ -136,6 +154,7 @@ ACE_Pipe::send (const iovec iov[], int n) const
return ACE_OS::writev (this->write_handle (), iov, n);
#endif /* ACE_WIN32 */
}
ACE_INLINE ssize_t
ACE_Pipe::recv (iovec iov[], int n) const
{
@@ -146,6 +165,7 @@ ACE_Pipe::recv (iovec iov[], int n) const
return ACE_OS::readv (this->read_handle (), iov, n);
#endif /* ACE_WIN32 */
}
ACE_INLINE ssize_t
ACE_Pipe::send (const void *buf, size_t n,
ACE_OVERLAPPED *overlapped) const
@@ -155,6 +175,7 @@ ACE_Pipe::send (const void *buf, size_t n,
static_cast <const char *> (buf), n,
overlapped);
}
ACE_INLINE ssize_t
ACE_Pipe::recv (void *buf, size_t n,
ACE_OVERLAPPED *overlapped) const
@@ -163,4 +184,5 @@ ACE_Pipe::recv (void *buf, size_t n,
return ACE_OS::read (this->read_handle (), static_cast <char *> (buf), n,
overlapped);
}
ACE_END_VERSIONED_NAMESPACE_DECL