blob: 3cbf44983cd6dcaa2c5d5da5b5191fad83415880 (
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
|
/* -*- C++ -*- */
#if !defined(CB_H)
#define CB_H
#include "ace/Event_Handler.h"
#include "TimerDispatcher.h"
// Listing 1 code/ch20
class CB : public ACE_Event_Handler
{
public:
CB ();
// Set the timer id that is being handled by this instance.
void setID (long timerID);
// Get the timer id.
long getID (void);
// Handle the timeout.
virtual int handle_timeout(const ACE_Time_Value &tv,
const void *arg = 0);
virtual int handle_close (ACE_HANDLE handle,
ACE_Reactor_Mask close_mask);
private:
long timerID_;
int count_;
};
// Listing 1
#endif /*CB_H*/
|