blob: 8e0282ecfdd8e25bfa7178bc60e8278bc489c281 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
// $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 *transport)
{
while (!transport->queue_is_empty_i ())
{
if (transport->drain_queue_i () == -1)
return -1;
}
return 0;
}
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
|