2 #include "tao/Reactive_Flushing_Strategy.h"
3 #include "tao/Transport.h"
4 #include "tao/ORB_Core.h"
5 #include "tao/Queued_Message.h"
7 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
10 TAO_Reactive_Flushing_Strategy::schedule_output (TAO_Transport
*transport
)
12 return transport
->schedule_output_i ();
16 TAO_Reactive_Flushing_Strategy::cancel_output (TAO_Transport
*transport
)
18 return transport
->cancel_output_i ();
22 TAO_Reactive_Flushing_Strategy::flush_message (TAO_Transport
*transport
,
23 TAO_Queued_Message
*msg
,
24 ACE_Time_Value
*max_wait_time
)
28 // @@ Should we pass this down? Can we?
31 TAO_ORB_Core
* const orb_core
= transport
->orb_core ();
33 while (!msg
->all_data_sent () && result
>= 0)
35 result
= orb_core
->run (max_wait_time
, 1);
37 if (max_wait_time
!= nullptr) {
38 if (*max_wait_time
<= ACE_Time_Value::zero
) {
45 catch (const ::CORBA::Exception
&)
54 TAO_Reactive_Flushing_Strategy::flush_transport (TAO_Transport
*transport
55 , ACE_Time_Value
*max_wait_time
)
59 TAO_ORB_Core
* const orb_core
= transport
->orb_core ();
61 while (!transport
->queue_is_empty ())
63 if (orb_core
->run (max_wait_time
, 1) == -1)
66 if (max_wait_time
!= nullptr) {
67 if (*max_wait_time
<= ACE_Time_Value::zero
) {
74 catch (const ::CORBA::Exception
&)
82 TAO_END_VERSIONED_NAMESPACE_DECL