blob: 8b1de41178dc9ac7b5be6a6b46f342c1866fb3b5 (
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
|
//
// $Id$
//
#include "Payload_Receiver.h"
Payload_Receiver::Payload_Receiver (void)
: message_count_ (0)
, maybe_lost_count_ (0)
{
}
void
Payload_Receiver::more_data (
const Test::Payload& payload,
CORBA::Boolean maybe_lost)
{
if (payload.length() > 0)
{
if (maybe_lost)
{
++this->maybe_lost_count_;
}
else
{
++this->message_count_;
}
}
}
void
Payload_Receiver::ping (void)
{
}
int
Payload_Receiver::count (bool maybe_lost) const
{
return (maybe_lost) ?
maybe_lost_count_.value ()
: message_count_.value ();
}
|