00001 // $Id: Block_Flushing_Strategy.cpp 74052 2006-08-15 15:49:02Z mitza $ 00002 00003 #include "tao/Block_Flushing_Strategy.h" 00004 #include "tao/Transport.h" 00005 #include "tao/Queued_Message.h" 00006 00007 ACE_RCSID(tao, Block_Flushing_Strategy, "$Id: Block_Flushing_Strategy.cpp 74052 2006-08-15 15:49:02Z mitza $") 00008 00009 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00010 00011 int 00012 TAO_Block_Flushing_Strategy::schedule_output (TAO_Transport *) 00013 { 00014 return MUST_FLUSH; 00015 } 00016 00017 int 00018 TAO_Block_Flushing_Strategy::cancel_output (TAO_Transport *) 00019 { 00020 return 0; 00021 } 00022 00023 int 00024 TAO_Block_Flushing_Strategy::flush_message (TAO_Transport *transport, 00025 TAO_Queued_Message *msg, 00026 ACE_Time_Value *) 00027 { 00028 while (!msg->all_data_sent ()) 00029 { 00030 if (transport->handle_output () == -1) 00031 return -1; 00032 } 00033 return 0; 00034 } 00035 00036 int 00037 TAO_Block_Flushing_Strategy::flush_transport (TAO_Transport *transport) 00038 { 00039 while (!transport->queue_is_empty ()) 00040 { 00041 if (transport->handle_output () == -1) 00042 return -1; 00043 } 00044 return 0; 00045 } 00046 00047 TAO_END_VERSIONED_NAMESPACE_DECL