summaryrefslogtreecommitdiff
path: root/trunk/TAO/tao/Block_Flushing_Strategy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/TAO/tao/Block_Flushing_Strategy.cpp')
-rw-r--r--trunk/TAO/tao/Block_Flushing_Strategy.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/trunk/TAO/tao/Block_Flushing_Strategy.cpp b/trunk/TAO/tao/Block_Flushing_Strategy.cpp
new file mode 100644
index 00000000000..87082f19819
--- /dev/null
+++ b/trunk/TAO/tao/Block_Flushing_Strategy.cpp
@@ -0,0 +1,47 @@
+// $Id$
+
+#include "tao/Block_Flushing_Strategy.h"
+#include "tao/Transport.h"
+#include "tao/Queued_Message.h"
+
+ACE_RCSID(tao, Block_Flushing_Strategy, "$Id$")
+
+TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+
+int
+TAO_Block_Flushing_Strategy::schedule_output (TAO_Transport *)
+{
+ return MUST_FLUSH;
+}
+
+int
+TAO_Block_Flushing_Strategy::cancel_output (TAO_Transport *)
+{
+ return 0;
+}
+
+int
+TAO_Block_Flushing_Strategy::flush_message (TAO_Transport *transport,
+ TAO_Queued_Message *msg,
+ ACE_Time_Value *)
+{
+ while (!msg->all_data_sent ())
+ {
+ if (transport->handle_output () == -1)
+ return -1;
+ }
+ return 0;
+}
+
+int
+TAO_Block_Flushing_Strategy::flush_transport (TAO_Transport *transport)
+{
+ while (!transport->queue_is_empty ())
+ {
+ if (transport->handle_output () == -1)
+ return -1;
+ }
+ return 0;
+}
+
+TAO_END_VERSIONED_NAMESPACE_DECL