2 #include "Client_Task.h"
4 Client_Task::Client_Task (Test::Receiver_ptr receiver
,
5 CORBA::Long event_count
,
6 CORBA::ULong event_size
,
7 ACE_Thread_Manager
*thr_mgr
)
8 : ACE_Task_Base (thr_mgr
)
9 , receiver_ (Test::Receiver::_duplicate (receiver
))
10 , event_count_ (event_count
)
11 , event_size_ (event_size
)
16 Client_Task::svc (void)
18 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) Starting client task\n"));
19 Test::Payload
payload (this->event_size_
);
20 payload
.length (this->event_size_
);
22 for (CORBA::ULong j
= 0; j
!= payload
.length (); ++j
)
23 payload
[j
] = (j
% 256);
27 for (int i
= 0; i
!= this->event_count_
; ++i
)
29 this->receiver_
->receive_data (payload
);
32 catch (const CORBA::Exception
&)
36 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) Client task finished\n"));