Block_Flushing_Strategy.cpp

Go to the documentation of this file.
00001 // Block_Flushing_Strategy.cpp,v 1.7 2006/04/19 08:31:54 jwillemsen Exp
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, "Block_Flushing_Strategy.cpp,v 1.7 2006/04/19 08:31:54 jwillemsen Exp")
00008 
00009 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00010 
00011 int
00012 TAO_Block_Flushing_Strategy::schedule_output (TAO_Transport *transport)
00013 {
00014   while (!transport->queue_is_empty_i ())
00015     {
00016       if (transport->drain_queue_i () == -1)
00017         return -1;
00018     }
00019   return 0;
00020 }
00021 
00022 int
00023 TAO_Block_Flushing_Strategy::cancel_output (TAO_Transport *)
00024 {
00025   return 0;
00026 }
00027 
00028 int
00029 TAO_Block_Flushing_Strategy::flush_message (TAO_Transport *transport,
00030                                             TAO_Queued_Message *msg,
00031                                             ACE_Time_Value *)
00032 {
00033   while (!msg->all_data_sent ())
00034     {
00035       if (transport->handle_output () == -1)
00036         return -1;
00037     }
00038   return 0;
00039 }
00040 
00041 int
00042 TAO_Block_Flushing_Strategy::flush_transport (TAO_Transport *transport)
00043 {
00044   while (!transport->queue_is_empty ())
00045     {
00046       if (transport->handle_output () == -1)
00047         return -1;
00048     }
00049   return 0;
00050 }
00051 
00052 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 11:54:08 2006 for TAO by doxygen 1.3.6