diff options
Diffstat (limited to 'ACE/ace/Pipe.cpp')
-rw-r--r-- | ACE/ace/Pipe.cpp | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/ACE/ace/Pipe.cpp b/ACE/ace/Pipe.cpp index f40299ce79f..aa87ab740eb 100644 --- a/ACE/ace/Pipe.cpp +++ b/ACE/ace/Pipe.cpp @@ -180,6 +180,21 @@ ACE_Pipe::open (int buffer_size) return -1; } # endif /* ! ACE_LACKS_SOCKET_BUFSIZ */ +# if defined (ACE_OPENVMS) && !defined (ACE_LACKS_TCP_NODELAY) + int one = 1; + // OpenVMS implements socketpair(AF_UNIX...) by returning AF_INET sockets. + // Since these are plagued by Nagle as any other INET socket we need to set + // TCP_NODELAY on the write handle. + if (ACE_OS::setsockopt (this->handles_[1], + ACE_IPPROTO_TCP, + TCP_NODELAY, + reinterpret_cast <const char *> (&one), + sizeof (one)) == -1) + { + this->close (); + return -1; + } +# endif /* ACE_OPENVMS && !ACE_LACKS_TCP_NODELAY */ #endif /* ! ACE_LACKS_SOCKETPAIR && ! ACE_HAS_STREAM_PIPES */ // Point both the read and write HANDLES to the appropriate socket // HANDLEs. @@ -326,13 +341,13 @@ ACE_Pipe::recv (size_t n, ...) const } #if defined (ACE_WIN32) - ssize_t result = ACE::recvv (this->read_handle (), - iovp, - total_tuples); + ssize_t const result = ACE::recvv (this->read_handle (), + iovp, + total_tuples); #else - ssize_t result = ACE_OS::readv (this->read_handle (), - iovp, - total_tuples); + ssize_t const result = ACE_OS::readv (this->read_handle (), + iovp, + total_tuples); #endif /* ACE_WIN32 */ #if !defined (ACE_HAS_ALLOCA) |