diff options
Diffstat (limited to 'ACE/examples/APG/Streams/CommandTask.h')
-rw-r--r-- | ACE/examples/APG/Streams/CommandTask.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/ACE/examples/APG/Streams/CommandTask.h b/ACE/examples/APG/Streams/CommandTask.h new file mode 100644 index 00000000000..ae78017b0f9 --- /dev/null +++ b/ACE/examples/APG/Streams/CommandTask.h @@ -0,0 +1,39 @@ +/* -*- C++ -*- */ +// $Id$ + +#ifndef COMMAND_TASK_H +#define COMMAND_TASK_H + +#include "ace/Task.h" +#include "ace/Module.h" + +#include "Command.h" + +// Listing 01 code/ch18 +class CommandTask : public ACE_Task<ACE_MT_SYNCH> +{ +public: + typedef ACE_Task<ACE_MT_SYNCH> inherited; + + virtual ~CommandTask () { } + + virtual int open (void * = 0 ); + + int put (ACE_Message_Block *message, + ACE_Time_Value *timeout); + + virtual int svc (void); + + virtual int close (u_long flags); + +protected: + CommandTask (int command); + + virtual int process (Command *message); + + int command_; +}; +// Listing 01 + + +#endif /* COMMAND_TASK_H */ |