summaryrefslogtreecommitdiff
path: root/TAO/tao/Strategies/UIOP_Connection_Handler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Strategies/UIOP_Connection_Handler.cpp')
-rw-r--r--TAO/tao/Strategies/UIOP_Connection_Handler.cpp44
1 files changed, 8 insertions, 36 deletions
diff --git a/TAO/tao/Strategies/UIOP_Connection_Handler.cpp b/TAO/tao/Strategies/UIOP_Connection_Handler.cpp
index 113f4925512..e36093aecf9 100644
--- a/TAO/tao/Strategies/UIOP_Connection_Handler.cpp
+++ b/TAO/tao/Strategies/UIOP_Connection_Handler.cpp
@@ -4,6 +4,8 @@
#if TAO_HAS_UIOP == 1
+#include "UIOP_Transport.h"
+#include "UIOP_Endpoint.h"
#include "tao/debug.h"
#include "tao/ORB_Core.h"
#include "tao/ORB.h"
@@ -11,8 +13,8 @@
#include "tao/Timeprobe.h"
#include "tao/Server_Strategy_Factory.h"
#include "tao/Messaging_Policy_i.h"
-#include "UIOP_Endpoint.h"
#include "tao/Base_Transport_Property.h"
+#include "tao/GIOP_Message_Lite.h"
#if !defined (__ACE_INLINE__)
# include "UIOP_Connection_Handler.inl"
@@ -20,10 +22,6 @@
ACE_RCSID(Strategies, UIOP_Connect, "$Id$")
-#include "tao/GIOP_Message_Lite.h"
-
-
-
TAO_UIOP_Connection_Handler::TAO_UIOP_Connection_Handler (ACE_Thread_Manager *t)
: TAO_UIOP_SVC_HANDLER (t, 0 , 0),
TAO_Connection_Handler (0),
@@ -60,23 +58,8 @@ TAO_UIOP_Connection_Handler::TAO_UIOP_Connection_Handler (TAO_ORB_Core *orb_core
TAO_UIOP_Connection_Handler::~TAO_UIOP_Connection_Handler (void)
{
- if (this->transport () != 0) {
- // If the socket has not already been closed.
- if (this->get_handle () != ACE_INVALID_HANDLE)
- {
- // Cannot deal with errors, and therefore they are ignored.
- this->transport ()->send_buffered_messages ();
- }
- else
- {
- // Dequeue messages and delete message blocks.
- this->transport ()->dequeue_all ();
- }
- }
}
-
-
int
TAO_UIOP_Connection_Handler::open (void*)
{
@@ -196,9 +179,6 @@ TAO_UIOP_Connection_Handler::handle_close (ACE_HANDLE handle,
// Close the handle..
if (this->get_handle () != ACE_INVALID_HANDLE)
{
- // Send the buffered messages first
- this->transport ()->send_buffered_messages ();
-
// Mark the entry as invalid
this->transport ()->mark_invalid ();
@@ -206,9 +186,11 @@ TAO_UIOP_Connection_Handler::handle_close (ACE_HANDLE handle,
// a reference to it. This will eventually call
// TAO_Transport::release ().
this->transport (0);
+
+ this->peer ().close ();
}
- this->destroy ();
+ delete this;
}
return 0;
@@ -225,23 +207,13 @@ int
TAO_UIOP_Connection_Handler::handle_timeout (const ACE_Time_Value &,
const void *)
{
- // This method is called when buffering timer expires.
- //
- ACE_Time_Value *max_wait_time = 0;
-
- TAO_Stub *stub = 0;
- int has_timeout;
- this->orb_core ()->call_timeout_hook (stub,
- has_timeout,
- *max_wait_time);
-
// Cannot deal with errors, and therefore they are ignored.
- this->transport ()->send_buffered_messages (max_wait_time);
+ if (this->transport ()->handle_output () == -1)
+ return -1;
return 0;
}
-
int
TAO_UIOP_Connection_Handler::add_transport_to_cache (void)
{