aboutsummaryrefslogtreecommitdiff
path: root/dep/acelite/ace/Pipe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dep/acelite/ace/Pipe.cpp')
-rw-r--r--dep/acelite/ace/Pipe.cpp29
1 files changed, 14 insertions, 15 deletions
diff --git a/dep/acelite/ace/Pipe.cpp b/dep/acelite/ace/Pipe.cpp
index d2b6965597a..bb8a851eace 100644
--- a/dep/acelite/ace/Pipe.cpp
+++ b/dep/acelite/ace/Pipe.cpp
@@ -1,4 +1,4 @@
-// $Id: Pipe.cpp 87115 2009-10-15 11:27:23Z olli $
+// $Id: Pipe.cpp 92010 2010-09-24 14:54:19Z shuston $
#include "ace/Pipe.h"
#include "ace/SOCK_Acceptor.h"
@@ -18,7 +18,7 @@
#include "ace/Pipe.inl"
#endif /* __ACE_INLINE__ */
-ACE_RCSID(ace, Pipe, "$Id: Pipe.cpp 87115 2009-10-15 11:27:23Z olli $")
+
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -254,21 +254,20 @@ ACE_Pipe::close (void)
{
ACE_TRACE ("ACE_Pipe::close");
- int result = 0;
-
- // Note that the following will work even if we aren't closing down
- // sockets because <ACE_OS::closesocket> will just call <::close> in
- // that case!
-
- if (this->handles_[0] != ACE_INVALID_HANDLE)
- result = ACE_OS::closesocket (this->handles_[0]);
- this->handles_[0] = ACE_INVALID_HANDLE;
+ int result = this->close_read ();
+ result |= this->close_write ();
+ return result;
+}
- if (this->handles_[1] != ACE_INVALID_HANDLE)
- result |= ACE_OS::closesocket (this->handles_[1]);
- this->handles_[1] = ACE_INVALID_HANDLE;
+int
+ACE_Pipe::close_read (void)
+{
+ return this->close_handle (0);
+}
- return result;
+int ACE_Pipe::close_write (void)
+{
+ return this->close_handle (1);
}
// Send N char *ptrs and int lengths. Note that the char *'s precede