Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Thread_Per_Connection_Handler.cpp
blob0b81e5e3a52af4ea0c2d2cc49808c9d947d8a73a
1 #include "tao/Thread_Per_Connection_Handler.h"
2 #include "tao/Connection_Handler.h"
3 #include "tao/debug.h"
4 #include "tao/Transport.h"
5 #include "tao/ORB_Core.h"
6 #include "ace/Flag_Manip.h"
8 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
10 TAO_Thread_Per_Connection_Handler::TAO_Thread_Per_Connection_Handler (
11 TAO_Connection_Handler *ch,
12 TAO_ORB_Core *oc)
13 : ACE_Task_Base (oc->thr_mgr ())
14 , ch_ (ch)
16 this->ch_->transport ()->add_reference ();
19 TAO_Thread_Per_Connection_Handler::~TAO_Thread_Per_Connection_Handler ()
21 this->ch_->close_connection ();
22 this->ch_->transport ()->remove_reference ();
25 int
26 TAO_Thread_Per_Connection_Handler::svc ()
28 ACE::clr_flags (this->ch_->transport ()->event_handler_i ()->get_handle (),
29 ACE_NONBLOCK);
31 // Call the implementation here
32 return this->ch_->svc_i ();
35 int
36 TAO_Thread_Per_Connection_Handler::open (void*v)
38 return this->ch_->open_handler (v);
41 int
42 TAO_Thread_Per_Connection_Handler::close (u_long)
44 delete this;
46 return 0;
49 TAO_END_VERSIONED_NAMESPACE_DECL