summaryrefslogtreecommitdiff
path: root/ace
diff options
context:
space:
mode:
Diffstat (limited to 'ace')
-rw-r--r--ace/Asynch_Acceptor.cpp3
-rw-r--r--ace/Asynch_IO.cpp12
-rw-r--r--ace/Asynch_IO.h6
3 files changed, 18 insertions, 3 deletions
diff --git a/ace/Asynch_Acceptor.cpp b/ace/Asynch_Acceptor.cpp
index c32b8b330ed..2321302c331 100644
--- a/ace/Asynch_Acceptor.cpp
+++ b/ace/Asynch_Acceptor.cpp
@@ -263,6 +263,9 @@ ACE_Asynch_Acceptor<HANDLER>::handle_accept (const ACE_Asynch_Accept::Result &re
if (result.act () != 0)
new_handler->act (result.act ());
+ // Set up the handler's new handle value
+ new_handler->handle (result.accept_handle ());
+
// Initiate the handler
new_handler->open (result.accept_handle (),
result.message_block ());
diff --git a/ace/Asynch_IO.cpp b/ace/Asynch_IO.cpp
index 0d2595f82b9..b7bd8edcc2b 100644
--- a/ace/Asynch_IO.cpp
+++ b/ace/Asynch_IO.cpp
@@ -911,12 +911,12 @@ ACE_Asynch_Transmit_File::Header_And_Trailer::transmit_buffers (void)
// *********************************************************************
ACE_Handler::ACE_Handler (void)
- : proactor_ (0)
+ : proactor_ (0), handle_ (ACE_INVALID_HANDLE)
{
}
ACE_Handler::ACE_Handler (ACE_Proactor *d)
- : proactor_ (d)
+ : proactor_ (d), handle_ (ACE_INVALID_HANDLE)
{
}
@@ -980,7 +980,13 @@ ACE_Handler::proactor (ACE_Proactor *p)
ACE_HANDLE
ACE_Handler::handle (void) const
{
- return ACE_INVALID_HANDLE;
+ return this->handle_;
+}
+
+void
+ACE_Handler::handle (ACE_HANDLE h)
+{
+ this->handle_ = h;
}
// ************************************************************
diff --git a/ace/Asynch_IO.h b/ace/Asynch_IO.h
index b2a67db6847..121e8c30eb5 100644
--- a/ace/Asynch_IO.h
+++ b/ace/Asynch_IO.h
@@ -1085,9 +1085,15 @@ public:
*/
virtual ACE_HANDLE handle (void) const;
+ /// Set the ACE_HANDLE value for this Handler.
+ virtual void handle (ACE_HANDLE);
+
protected:
/// The proactor associated with this handler.
ACE_Proactor *proactor_;
+
+ /// The ACE_HANDLE in use with this handler.
+ ACE_HANDLE handle_;
};
// Forward declarations