Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / ACE / examples / APG / Reactor / ClientService.h
blob713f4240b8cf67de34cee8ffdb6f8910d8480acd
1 /**
2 * Sample code from The ACE Programmer's Guide,
3 * copyright 2003 Addison-Wesley. All Rights Reserved.
4 */
6 #ifndef __CLIENTSERVICE_H_
7 #define __CLIENTSERVICE_H_
9 #include "ace/Synch_Traits.h"
10 #include "ace/Null_Condition.h"
11 #include "ace/Null_Mutex.h"
13 // Listing 3 code/ch07
14 #include "ace/Message_Block.h"
15 #include "ace/SOCK_Stream.h"
16 #include "ace/Svc_Handler.h"
18 class ClientService :
19 public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
21 typedef ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> super;
23 public:
24 int open (void * = 0);
26 // Called when input is available from the client.
27 virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE);
29 // Called when output is possible.
30 virtual int handle_output (ACE_HANDLE fd = ACE_INVALID_HANDLE);
32 // Called when this handler is removed from the ACE_Reactor.
33 virtual int handle_close (ACE_HANDLE handle,
34 ACE_Reactor_Mask close_mask);
36 // Listing 3
38 #endif /* __CLIENTSERVICE_H_ */