Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Block_Flushing_Strategy.cpp

Go to the documentation of this file.
00001 #include "tao_pch.h"
00002 // -*- C++ -*-
00003 // $Id: Block_Flushing_Strategy.cpp,v 1.1.1.1.40.1 2003/03/14 16:05:12 chad Exp $
00004 
00005 #include "Block_Flushing_Strategy.h"
00006 #include "Transport.h"
00007 #include "Queued_Message.h"
00008 
00009 ACE_RCSID(tao, Block_Flushing_Strategy, "$Id: Block_Flushing_Strategy.cpp,v 1.1.1.1.40.1 2003/03/14 16:05:12 chad Exp $")
00010 
00011 int
00012 TAO_Block_Flushing_Strategy::schedule_output (TAO_Transport *transport)
00013 {
00014   while (!transport->queue_is_empty_i ())
00015     {
00016       int result = transport->drain_queue_i ();
00017       if (result == -1)
00018         return -1;
00019     }
00020   return 0;
00021 }
00022 
00023 int
00024 TAO_Block_Flushing_Strategy::cancel_output (TAO_Transport *)
00025 {
00026   return 0;
00027 }
00028 
00029 int
00030 TAO_Block_Flushing_Strategy::flush_message (TAO_Transport *transport,
00031                                             TAO_Queued_Message *msg,
00032                                             ACE_Time_Value *)
00033 {
00034   while (!msg->all_data_sent ())
00035     {
00036       int result = transport->handle_output ();
00037       if (result == -1)
00038         return -1;
00039     }
00040   return 0;
00041 }
00042 
00043 int
00044 TAO_Block_Flushing_Strategy::flush_transport (TAO_Transport *transport)
00045 {
00046   while (!transport->queue_is_empty ())
00047     {
00048       int result = transport->handle_output ();
00049       if (result == -1)
00050         return -1;
00051     }
00052   return 0;
00053 }

Generated on Mon Jun 16 13:48:01 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002